API Documentation (2.1.3)

Financial Analytics API

Overview

The Financial Analytics API provides comprehensive data analysis and insights for ISA investments and trading behavior. This powerful platform enables financial institutions, advisors, and analysts to access detailed metrics, trends, and recommendations through a simple, consistent REST API.

Key Capabilities

ISA Analytics

Access detailed analytics on Individual Savings Accounts (ISAs) including:

  • Provider market share and performance metrics
  • Customer demographic analysis across age groups and income brackets
  • Behavioral patterns and investment preferences
  • Term duration and risk profile analysis
  • Personalized provider recommendations

Trading Analytics

Comprehensive trading data analysis including:

  • Market trends and sentiment indicators
  • Trading pair popularity and directional bias
  • Trader behavior patterns and preferences
  • Broker performance metrics and comparison
  • Predictive signals and anomaly detection

Authentication

All API requests require authentication using an API key which should be passed as a query parameter:

GET /isa/summary?api_key=your_api_key

Contact our team to obtain your API key and access credentials.

Rate Limits

Our API offers different tiers of access:

  • Standard: 60 requests per minute
  • Premium: 300 requests per minute
  • Enterprise: Custom limits available

Response Format

All responses are returned in JSON format and follow a consistent structure:

{
  "timestamp": "2024-03-20T12:00:00Z",
  "data": {
    // Response data specific to the endpoint
  }
}

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests:

  • 200: Success
  • 400: Bad request (invalid parameters)
  • 401: Unauthorized (invalid API key)
  • 404: Resource not found
  • 422: Validation error
  • 429: Rate limit exceeded
  • 500: Server error

Error responses include detailed information to help troubleshoot the issue:

{
  "timestamp": "2024-03-20T12:00:00Z",
  "error": "Validation Error",
  "detail": "Invalid parameter: start_date must be in DD-MM-YY format"
}

Versioning

The API uses a semantic versioning system (Major.Minor.Patch). The current version is 2.1.3.

Getting Started

  1. Sign up for an API key at our developer portal
  2. Explore the available endpoints in this documentation
  3. Make your first request to the API
  4. Implement the insights into your application or analysis
Download OpenAPI description
Languages
Servers
Mock server
https://docs.tfe.ai/_mock/openapi/
Production server
https://api.tfe.ai/

Behavioral

Operations

ISA Analytics: Behavioral Module

This module provides analysis of ISA customer behavior patterns, including:

  • ISA type preferences and trends
  • Trending patterns and behavioral insights
  • Account holder behaviors
  • Average metrics and growth analysis
  • Most popular analysis and customer preferences

ISA Type Breakdown Response

{
  "timestamp": "2024-03-20T12:00:00Z",
  "data": {
    "date_range": "2024-02-24 to 2024-03-24",
    "total_isa_types": 2,
    "isa_type_statistics": [
      {
        "isa_type": "Cash ISA",
        "percentage": 65.5,
        "average_initial_deposit": 4200.0,
        "average_monthly_deposit": 225.0,
        "average_interest_rate": 3.95,
        "average_final_amount": 13500.0,
        "most_common_provider": "Halifax",
        "most_common_age_group": "45-54",
        "provider_distribution": {
          "Halifax": 38.5,
          "Moneybox": 27.3,
          "Nutmeg": 16.7,
          "Vanguard": 10.8,
          "Other": 6.7
        }
      },
      {
        "isa_type": "Stocks & Shares ISA",
        "percentage": 34.5,
        "average_initial_deposit": 5200.0,
        "average_monthly_deposit": 345.0,
        "average_interest_rate": 0,
        "average_final_amount": 16500.0,
        "most_common_provider": "Vanguard",
        "most_common_age_group": "35-44",
        "provider_distribution": {
          "Vanguard": 42.5,
          "Nutmeg": 32.3,
          "Moneybox": 18.7,
          "Halifax": 4.8,
          "Other": 1.7
        }
      }
    ]
  }
}

Trends Response

{
  "status": "success",
  "timestamp": "2024-03-20T12:00:00Z",
  "data": {
    "period": "30d",
    "total_records": 1000,
    "most_popular_provider": "Bank A",
    "fastest_growing_provider": "Bank C",
    "most_popular_age_group": "25-34",
    "average_initial_deposit": 5000.0,
    "average_monthly_deposit": 300.0,
    "average_interest_rate": 3.5,
    "provider_trends": [
      {
        "provider": "Bank A",
        "growth_rate": 5.2,
        "customer_count": 300,
        "market_share": 30.0
      }
    ]
  }
}

ISA Type Analysis

The ISA Type endpoint provides insights into customer preferences for different ISA products:

  • Cash ISA vs. Stocks & Shares ISA distribution
  • Lifetime ISA and Innovative Finance ISA adoption
  • ISA type preferences by demographic
  • Trends in ISA type selection over time

ISA Type

Request

Get breakdown of ISA data by calculator type

Args: request: FastAPI request object provider: Filter by provider

Returns: ISA calculator type breakdown information

Query
providerstring(Provider)

Filter by provider

curl -i -X GET \
  'https://docs.tfe.ai/_mock/openapi/ISA/isa-type?provider=string' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
dataArray of objects
statusstring
Example: "success"
timestampstring(date-time)
date_rangestring
Example: "25-02-24 to 25-03-24"
providerstring
Example: "All Providers"
breakdown_typestring
Example: "Term"
Response
application/json
{ "status": "success", "message": "ISA type breakdown retrieved successfully", "timestamp": "2023-06-01T12:00:00Z", "data": { "date_range": "01-01-24 to 01-02-24", "isa_type": [ … ] } }

Demographic

Operations

Provider

Operations

Summary

Operations

Market Analysis

Analysis of market trends, instruments, and trading signals

Operations

Trader Analytics

Analysis of trader behavior and demographics

Operations

Broker Insights

Broker analysis, comparison, and performance metrics

Operations

Summary Metrics

Overview statistics and most popular metrics

Operations

FAQ

Error Handling

Quick Start Guide

Authentication

Security