Model Details

Mandatory Time Periods

1 - 501

Optional Time Periods

502 - 10,000

Request Header

Authorization
string
required

The authorization token for API requests. This should be a valid Bearer token.

Parameter Fields

ticker
string
required
interval
string
required
historical_data_from
string
required
date_to_forecast
list
required

Historical Data Availability

TimeframeData Range
1 minuteLast 120 days
5 minutesLast 600 days
1 hourSince October 1, 2020
DailySince January 1, 1990
WeeklySince January 1, 1990

Response Fields

datetime
string

Timestamp for forecast

open
number

Opening price for period

current_trend_direction
number
forecasted_trend_direction
number
cumulative_trend_forecast
number

Cumulative price trend forecast for comparison with actual price (Not to Scale)

risk_forecast_%
number

Expected price movement range (%)

risk_forecast
number

Expected price movement range (absolute)

Example - API Request

# Import necessary libraries
import pandas as pd
import requests

# Define base URL and access token for the API
BASE_URL = ""  
ACCESS_TOKEN = ""  

# Query parameters for the API request
params = {
    "ticker": "MSFT",
    "interval": "5m",
    "historical_data_from": "2020-08-03 13:30:00",
    "date_to_forecast": "2024-08-04 19:00:00"
}

# Headers for the API request
headers = {
    "Authorization": f"Bearer {ACCESS_TOKEN}"
}

# Set API endpoint URL
api_url = f"{BASE_URL}/genesis/ts-model-df"

# Set header for API request
headers = {"Authorization": f"Bearer {TOKEN}", 'Content-Type': 'application/json'}

# Send POST request to API
response = requests.post(api_url, json=data, headers=headers)

# Parse JSON response
resp = response.json()

Example - API Response


{
  
  "2020-08-03 00:00:00":
    {
      "open":194.33,
      "current_trend":1,
      "price_trend_forecast":1,
      "risk_forecast_%":-0.2,
      "risk_forecast":193.94,
      "cumulative_trend_forecast":1
    },

  "2020-08-04 00:00:00":
    {
      "open":194.95,
      "current_trend":1,
      "price_trend_forecast":0,
      "risk_forecast_%":-0.52,
      "risk_forecast":193.94,
      "cumulative_trend_forecast":1 
    }
  
  ..., 

  "2024-09-03 00:00:00":
    {
      "open":286.35,
      "current_trend":-1,
      "price_trend_forecast":-1,
      "risk_forecast_%":1.1,
      "risk_forecast":289.5,
      "cumulative_trend_forecast":3000
    },

  "2024-09-04 00:00:00":
    {
      "open":286.55,
      "current_trend":-1,
      "price_trend_forecast":-1,
      "risk_forecast_%":0.9,
      "risk_forecast":289.13,
      "cumulative_trend_forecast":2999

    }
    
}