NAV
shell

Introduction

Welcome to the FinBrain API! You can use our API to access FinBrain API endpoints, which can get predictions for markets you have subscribed for API access.

You can view code examples in the dark area to the right, and you can see the example responses in JSON format.

Authentication

FinBrain API uses API keys to allow access to the API. You can get a new FinBrain API Key at your Profile Page on FinBrain Dashboard.

FinBrain API expects for the API Key to be included in all requests to the server in a query string that looks like the following:

token=YOUR_API_KEY

Availables

Get All Markets

curl "https://api.finbrain.tech/v1/available/markets?token=<YOUR_API_KEY>"

The above command returns JSON structured like this:

{
    "availableMarkets": [
        "S&P 500",
        "NASDAQ",
        ...
    ]
}

This endpoint retrieves all markets.

HTTP Request

GET https://api.finbrain.tech/v1/available/markets?token=<YOUR_API_KEY>

Get All Tickers

curl "https://api.finbrain.tech/v1/available/tickers/<TYPE>?token=<YOUR_API_KEY>"

The above command returns JSON structured like this:

[
  {
        "ticker": "AIG",
        "name": "American International Group Inc.",
        "market": "S&P 500"
    },
    {
        "ticker": "AAPL",
        "name": "Apple Inc.",
        "market": "S&P 500"
    },
    ...
]

This endpoint retrieves a list of all predicted tickers for given type, that your subscriptions have access.

HTTP Request

GET https://api.finbrain.tech/v1/available/tickers/<TYPE>?token=<YOUR_API_KEY>

URL Parameters

Parameter Values Description
TYPE daily,monthly Type of the prediction.

Predictions

Get Market Predictions

curl "https://api.finbrain.tech/v1/market/<MARKET_NAME>/predictions/<TYPE>?token=<YOUR_API_KEY>"

The above command returns JSON structured like this (Example: "S&P 500" Market):

[
     {
        "ticker": "STX",
        "name": "Seagate Technology",
        "prediction": {
            "predictability": "0.62487",
            "expectedShort": "1.24632",
            "expectedMid": "1.34583",
            "expectedLong": "0.07213",
            "technicalAnalysis": "STX price has changed -6.25% in the last 3 days and -0.83% yesterday. RSI is currently neutral but close to the oversold area and the indicator is pointing downwards. MACD is in the Bearish area and the histogram is moving downwards. STX price is trading below the 200-day SMA line and the SMA is trending down. The asset price is between the Middle and the Lower Bollinger Bands. Our Deep Learning algorithms have analyzed the Historical Pricing Data & Technical Indicators & The Market Sentiment numerically for STX and the results are as the followings. FinBrain expects an upward move with a 0.07% change in the asset price within the next 10 days. The predictability of the asset is 62%.",
            "lastUpdate": "2020-10-27T23:46:54.359Z",
            "type": "daily"
        },
        "sentimentScore": "-0.137"
    },
    {
        "ticker": "TAP",
        "name": "Molson Coors Brewing Company",
        "prediction": {
            "predictability": "0.73645",
            "expectedShort": "0.14241",
            "expectedMid": "1.19539",
            "expectedLong": "1.34984",
            "technicalAnalysis": "TAP price has changed -4.22% in the last 3 days and -3.07% yesterday. RSI is currently neutral but close to the oversold area and the indicator is pointing downwards. MACD is in the Bearish area and the histogram is moving downwards. TAP price is trading below the 200-day SMA line and the SMA is trending down. The asset price is between the Middle and the Lower Bollinger Bands. Our Deep Learning algorithms have analyzed the Historical Pricing Data & Technical Indicators & The Market Sentiment numerically for TAP and the results are as the followings. FinBrain expects an upward move with a 1.35% change in the asset price within the next 10 days. The predictability of the asset is 74%.",
            "lastUpdate": "2020-10-27T23:46:54.415Z",
            "type": "daily"
        },
        "sentimentScore": "0.261"
    },
    ...
]

This endpoint retrieves all predictions for given market and prediction type.

HTTP Request

GET https://api.finbrain.tech/v1/market/<MARKET_NAME>/predictions/<TYPE>?token=<YOUR_API_KEY>

URL Parameters

Parameter Values Description
MARKET_NAME one of the markets One of the markets you have subscribed.
TYPE daily,monthly Type of the prediction.

Response Mappings

Name Type Description
ticker daily,monthly Ticker listed in the market
name daily,monthly Long name of the related ticker
predictability daily,monthly Predictability of the ticker between 0 and 1, calculated by FinBrain AI
expectedShort daily,monthly Expected change in percentage for ticker after 3 days / 3 months
expectedMid daily,monthly Expected change in percentage for ticker after 5 days / 6 months
expectedLong daily,monthly Expected change in percentage for ticker after 10 days / 12 months
technicalAnalysis daily Technical Analysis generated by FinBrain AI
lastUpdate daily,monthly Last time FinBrain AI generated prediction for given ticker
type daily,monthly  Prediction type returned for the request
sentimentScore daily FinBrain's last sentiment analysis score for US Stocks

Get Ticker Predictions

curl "https://api.finbrain.tech/v1/ticker/<TICKER>/predictions/<TYPE>?token=<YOUR_API_TOKEN>"

The above command returns JSON structured like this (Example: "AAPL"):

{
  "ticker": "AAPL",
  "name": "Apple Inc.",
  "prediction": {
    "2020-10-28": "115.18945",
    "2020-10-29": "113.80394",
    "2020-10-30": "112.70335",
    "2020-11-02": "111.8413",
    "2020-11-03": "111.34565",
    "2020-11-04": "111.05939",
    "2020-11-05": "110.83417",
    "2020-11-06": "110.61216",
    "2020-11-09": "110.37905",
    "2020-11-10": "110.14823",
    "expectedShort": "-3.3419",
    "expectedMid": "-4.5063",
    "expectedLong": "-5.53325",
    "predictability": "0.77513",
    "technicalAnalysis": "AAPL price has changed 0.73% in the last 3 days and 1.35% yesterday. RSI is currently neutral but close to the overbought area and the indicator is pointing downwards. MACD is in the Bearish area and the histogram is moving upwards. AAPL price is trading above the 200-day SMA line and the SMA is trending up. The asset price is between the Middle and the Lower Bollinger Bands. Our Deep Learning algorithms have analyzed the Historical Pricing Data & Technical Indicators & The Market Sentiment numerically for AAPL and the results are as the followings. FinBrain expects an downward move with a -5.53% change in the asset price within the next 10 days. The predictability of the asset is 78%.",
    "type": "daily",
    "lastUpdate": "2020-10-27T23:46:52.491Z"
  },
  "sentimentAnalysis": {
    "2020-10-27": "0.461",
    "2020-10-26": "0.234",
    "2020-10-25": "-0.186",
    "2020-10-24": "0.023",
    "2020-10-23": "0.309",
    "2020-10-22": "0.112",
    "2020-10-21": "0.238",
    "2020-10-20": "-0.054",
    "2020-10-19": "0.543",
    "2020-10-18": "0.370"
  }
}

This endpoint retrieves predictions for the next 10 days/12 months for requested tickers.

HTTP Request

GET https://api.finbrain.tech/v1/ticker/<TICKER>/predictions/<TYPE>?token=<YOUR_API_TOKEN>

URL Parameters

Parameter Values Description
TICKER one of the tickers One of the tickers included in your subscriptions
TYPE daily,monthly Type of the prediction.

Response Mappings

Name Type Description
ticker daily,monthly Ticker listed in the market
name daily,monthly Long name of the related ticker
dates* daily,monthly  Predicted closing price of ticker for the given date
predictability daily,monthly Predictability of the ticker between 0 and 1, calculated by FinBrain AI
expectedShort daily,monthly Expected change in percentage for ticker after 3 days / 3 months
expectedMid daily,monthly Expected change in percentage for ticker after 5 days / 6 months
expectedLong daily,monthly Expected change in percentage for ticker after 10 days / 12 months
technicalAnalysis daily Technical Analysis generated by FinBrain AI
lastUpdate daily,monthly Last time FinBrain AI generated prediction for given ticker
type daily,monthly  Prediction type returned for the request
sentimentAnalysis daily FinBrain's sentiment analysis scores for US Stocks (last 10 days)

Sentiments

Get Ticker Sentiments

curl "https://api.finbrain.tech/v1/sentiments/<MARKET_NAME>/<TICKER>/<DAYS>?token=<YOUR_API_KEY>"

The above command returns JSON structured like this:

{
    "ticker": "AMZN",
    "name": "Amazon.com Inc.",
    "sentimentAnalysis": {
        "2021-12-15": "0.223",
        "2021-12-14": "0.037",
        "2021-12-13": "-0.038"
        ...
    }
}

This endpoint retrieves sentiments for the past 1-120 days for requested tickers.

HTTP Request

GET https://api.finbrain.tech/v1/sentiments/<MARKET_NAME>/<TICKER>/<DAYS>?token=<YOUR_API_KEY>

URL Parameters

Parameter Values Description
MARKET_NAME one of the markets One of the markets you have subscribed.
TICKER one of the tickers One of the tickers included in your subscriptions
DAYS [1...120] Past days included in request

Response Mappings

Name Description
ticker Ticker listed in the market
name Long name of the related ticker
sentimentAnalysis FinBrain's sentiment analysis scores for US Stocks

App Ratings

Get App Ratings

curl "https://api.finbrain.tech/v1/appratings/<MARKET_NAME>/<TICKER>?token=<YOUR_API_KEY>"

The above command returns JSON structured like this:

{
  "ticker": "AMZN",
  "name": "Amazon.com Inc",
  "appRatings": [
    {
      "score": 4.44,
      "ratingsCount": 2579609,
      "date": "2021-12-10"
    },
    {
      "score": 4.32,
      "ratingsCount": 2566355,
      "date": "2021-12-03"
    },
    {
      "score": 4.45,
      "ratingsCount": 2552930,
      "date": "2021-11-26"
    },
    ...

  ]
}

This endpoint retrieves mobile app ratings of the past 10 data points(if available) for requested tickers' mobile application.

HTTP Request

GET https://api.finbrain.tech/v1/appratings/<MARKET_NAME>/<TICKER>?token=<YOUR_API_KEY>

URL Parameters

Parameter Values Description
MARKET_NAME one of the markets One of the markets you have subscribed.
TICKER one of the tickers One of the tickers included in your subscriptions

Response Mappings

Name Description
ticker Ticker listed in the market
name Long name of the related ticker
appRatings FinBrain's mobile app rating analysis

Errors

The FinBrain API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- You don't have rights to make this request.
404 Not Found -- Requested data is not found.
405 Method Not Allowed -- You tried to access an endpoint we don't support.
500 Internal Server Error -- We had a problem with our server. Try again later.