Model Details

Mandatory Time Periods

1 - 501

Optional Time Periods

502 - 5,000

Request Header

Authorization
string
required

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

Request Body

Datetime
list
required
Open
list
required
High
list
required
Low
list
required
Close
list
required
Combine different time intervals to discover potential trading opportunities and find optimal entry points.

Response Fields

datetime
string

Trade opportunity timestamp

trade_identified
string

Example - API Request


# Import necessary libraries
import pandas as pd
import requests

# Define function to create json for API 
def trading_model_dict(df,aggregation):
    # Convert DataFrame to dictionary format
    return {
        "Datetime": df['Datetime'].tolist(),
        "Open": df['Open'].tolist(),
        "High": df['High'].tolist(),
        "Low": df['Low'].tolist(),
        "Close": df['Close'].tolist()
    }

# Import Data
df = pd.read_csv("")[['Datetime','Open','High','Low','Close']]

# Create JSON payload for API request
data = trading_model_dict(df)

# Specify Base URL & Access Token
BASE_URL = ""
TOKEN = ""

# Set API endpoint URL
api_url = f"{BASE_URL}/genesis/trade-identifier"

# 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

{
"2024-07-25 00:00:00": {
      "trade_identified": "Long"
    },
"2024-08-24 00:00:00": {
      "trade_identified": "Long"
    }
}