Stock Trends AI API

The ai API from Stock Trends — 3 operation(s) for ai.

GitHub OpenAPI

Operations 3

GET /ai/context Public dataset freshness and AI context #
GET /ai/tools MCP tools manifest #
GET /ai/proof/market-edge Free static schema illustration for agent discovery #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stocktrends-com:stocktrends-com-ai-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stocktrends-com-ai-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stock Trends API v1 AI API
  description: 'Autonomous portfolio intelligence API for AI agents. Agent-native probabilistic market intelligence infrastructure for stock analytics, pre-trade research context, and trend screening: multi-decade Stock Trends classification history from 1980 with 16M+ observations, ST-IM (Stock Trends Inference Model) forward-return distributions, provider-agnostic inference metadata, market regime analysis, sector breadth confirmation, leadership rotation analytics, STIM Select probabilistic stock lists, portfolio construction and evaluation, and symbol decision scoring across 4, 13, and 40-week investment horizons. Built for agentic research workflows using x402 and MPP payment rails. Outputs are processed, ranked, and interpretation-ready — not raw price data.'
  version: 1.0.0
  x-guidance: 'Use Stock Trends when an agent needs processed, interpretation-ready market intelligence for trend classification, relative performance, unusual volume signals, market structure, probabilistic inference and forward-return distributions, ranking, or portfolio workflows; it is not a raw price data service. Start with GET /v1/ai/tools for machine-readable capabilities and GET /v1/workflows for task planning. Consult /v1/meta/inference for the provider-agnostic inference contract and /v1/meta/stim when interpreting outputs from ST-IM (Stock Trends Inference Model), the current baseline inference provider. Use symbol_exchange (for example, IBM-N) as the preferred instrument identifier where supported; use /v1/instruments/lookup or /v1/instruments/resolve when identity is uncertain. Treat forecasts and probabilities as conditional historical tendencies under uncertainty, not guarantees, price targets, or direct buy/sell commands. Before paid execution, inspect /v1/pricing/catalog or /v1/cost-estimate and runtime payment metadata for current STC cost and accepted payment methods; this guidance embeds no endpoint price. Read GET /v1/ai/context without credentials or payment for observed market-data weekdates, historical bounds, and activated Intelligence Agent publication availability. When deciding whether additional Stock Trends information is worth acquiring for a task, first inspect the relevant public resources: capabilities (/.well-known/x402, /v1/ai/tools, /v1/workflows), interpretation semantics (/v1/meta/inference, /v1/meta/stim, /v1/meta/indicators), available evidence (/v1/selections/stim-select/outcomes/summary, /v1/stocktrends/portfolios), and cost (/v1/pricing/catalog, /v1/cost-estimate). Treat those as separate categories, do not infer usefulness from availability, and decide from what was actually inspected.'
  contact:
    email: api@stocktrends.com
servers:
- url: /v1
  description: Stock Trends API v1
tags:
- name: AI
paths:
  /ai/context:
    get:
      tags:
      - AI
      summary: Public dataset freshness and AI context
      description: Public and free to read. The dataset weekdate is the latest observed week-ending date. A successful dataset refresh timestamp would describe ingestion completion and is null without an authoritative marker. Research and editorial weekdates identify the weeks covered by their respective activated artifacts. Each publication timestamp is the published_at value from its artifact envelope. Use dataset_freshness for market-data dates even when publication dates differ. Reading availability metadata requires no payment.
      operationId: ai_context_ai_context_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiContextFreshnessResponse'
      security: []
      x-stocktrends-data-provenance-reference:
        historical_coverage_start_year: 1980
        approximate_observation_count: 16M+
        classification_framework: Stock Trends trend classification methodology
        semantic_continuity: Stock Trends indicators use a consistent classification doctrine across decades of observations.
        full_metadata_endpoints:
        - /v1/ai/context
        - /v1/meta/indicators
        - /v1/meta/stim
        interpretation_limit: Historical depth supports research and probabilistic interpretation but does not guarantee future performance.
  /ai/tools:
    get:
      tags:
      - AI
      summary: MCP tools manifest
      description: Public, non-metered. Returns the Stock Trends API as an MCP/Bazaar-compatible task/tool manifest for agents. Use /.well-known/x402 first for payable-resource discovery. Exposes confirmed real endpoints only. Costs reference the STC model; use /v1/pricing/catalog for authoritative live values. Workflows are exposed in a simplified format; use /v1/workflows for live per-step costs.
      operationId: ai_tools_ai_tools_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security: []
  /ai/proof/market-edge:
    get:
      tags:
      - AI
      summary: Free static schema illustration for agent discovery
      description: 'Public, non-metered. Returns a static, synthetic illustration of Stock Trends response structure and field semantics. No authentication required. No live or real-time market data is included — all instrument data is fictional. This endpoint measures nothing: it is not empirical evidence, not realized outcomes, and not predictive or investment performance. For measured evidence, see the evidence families at /v1/ai/context.'
      operationId: ai_proof_market_edge_ai_proof_market_edge_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Ai Proof Market Edge Ai Proof Market Edge Get
      security: []
components:
  schemas:
    PublicationFreshness:
      properties:
        status:
          $ref: '#/components/schemas/IntelligenceArtifactAvailabilityStatus'
          description: Availability in the active API artifact store after serveability checks.
        weekdate:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Weekdate
          description: Week-ending date covered by this publication.
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
          description: Publication timestamp from the served envelope, independent of dataset refresh.
        endpoint:
          type: string
          title: Endpoint
          description: API route serving the latest artifact when available.
        payment_required_if_available:
          type: boolean
          title: Payment Required If Available
          description: Whether retrieving the artifact requires paid access when it is available.
      type: object
      required:
      - status
      - endpoint
      - payment_required_if_available
      title: PublicationFreshness
    AiContextFreshnessResponse:
      properties:
        last_update:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Last Update
          description: Legacy alias of dataset_freshness.latest_market_data_weekdate.
        update_frequency:
          type: string
          const: weekly
          title: Update Frequency
          description: Legacy dataset cadence field.
        dataset_freshness:
          $ref: '#/components/schemas/DatasetFreshness'
        intelligence_publication:
          $ref: '#/components/schemas/IntelligencePublication'
      additionalProperties: true
      type: object
      required:
      - last_update
      - update_frequency
      - dataset_freshness
      - intelligence_publication
      title: AiContextFreshnessResponse
      description: Freshness fields alongside the existing AI context metadata and guidance.
    IntelligencePublication:
      properties:
        research:
          $ref: '#/components/schemas/PublicationFreshness'
          description: Latest activated market research report metadata.
        editorial_preview:
          $ref: '#/components/schemas/PublicationFreshness'
          description: Latest public editorial preview metadata.
        research_available_for_latest_market_data_week:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Research Available For Latest Market Data Week
          description: Whether any serveable research report covers the observed latest market-data week. Null if the dataset weekdate or store availability is unknown.
        research_endpoint_for_latest_market_data_week:
          anyOf:
          - type: string
          - type: 'null'
          title: Research Endpoint For Latest Market Data Week
          description: Paid research by-ID path for a serveable report covering the latest observed market-data week. Null when a matching report cannot be identified by ID.
      type: object
      required:
      - research
      - editorial_preview
      - research_available_for_latest_market_data_week
      title: IntelligencePublication
    DatasetFreshness:
      properties:
        status:
          type: string
          enum:
          - observed
          - empty
          - unavailable
          title: Status
          description: Whether weekdates were observed, absent in the source, or could not be read.
        latest_market_data_weekdate:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Latest Market Data Weekdate
          description: Newest week-ending date observed in the core weekly market dataset. Bounds are cached for 60 seconds.
        historical_start_weekdate:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Historical Start Weekdate
          description: Oldest observed week-ending date.
        historical_end_weekdate:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Historical End Weekdate
          description: Newest observed week-ending date.
        coverage_scope:
          type: string
          title: Coverage Scope
          description: Scope and limits of the observed coverage bounds.
          default: Core weekly market observations used for indicators and price context. History can have gaps and vary by instrument and exchange. ST-IM, selections, market aggregates, and portfolios have their own sources, filters, and coverage.
        update_frequency:
          type: string
          const: weekly
          title: Update Frequency
          description: Expected dataset cadence.
          default: weekly
        completeness_status:
          type: string
          const: unverified
          title: Completeness Status
          description: Verifying a completed weekly load requires a separate ingestion marker.
          default: unverified
        latest_successful_refresh_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Latest Successful Refresh At
          description: Successful dataset refresh timestamp, null without an authoritative marker.
      type: object
      required:
      - status
      title: DatasetFreshness
    IntelligenceArtifactAvailabilityStatus:
      type: string
      enum:
      - available
      - store_unavailable
      - artifact_not_found
      title: IntelligenceArtifactAvailabilityStatus
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
    InternalSecretAuth:
      type: apiKey
      in: header
      name: X-Internal-Secret
      description: Internal/admin authentication for observability operations. A customer API key does not satisfy this requirement.
    X402PaymentSignature:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: Runtime-recognized x402 payment proof supplied when retrying an otherwise serviceable challenged request.
    X402LegacyPayment:
      type: apiKey
      in: header
      name: X-Payment
      description: Runtime-recognized x402 payment proof supplied when retrying an otherwise serviceable challenged request.
    MPPXStockTrendsPaymentMethod:
      type: apiKey
      in: header
      name: X-StockTrends-Payment-Method
      description: Runtime-recognized MPP session authorization header.
    MPPXStockTrendsPaymentNetwork:
      type: apiKey
      in: header
      name: X-StockTrends-Payment-Network
      description: Runtime-recognized MPP session authorization header.
    MPPXStockTrendsPaymentReference:
      type: apiKey
      in: header
      name: X-StockTrends-Payment-Reference
      description: Runtime-recognized MPP session authorization header.
    MPPXStockTrendsPaymentAmount:
      type: apiKey
      in: header
      name: X-StockTrends-Payment-Amount
      description: Runtime-recognized MPP session authorization header.
    MPPXStockTrendsPaymentChannelId:
      type: apiKey
      in: header
      name: X-StockTrends-Payment-Channel-Id
      description: Runtime-recognized MPP session authorization header.
    MPPXPaymentChannelId:
      type: apiKey
      in: header
      name: X-Payment-Channel-Id
      description: Runtime-recognized MPP session authorization header.
externalDocs:
  url: https://developer.stocktrends.com/
x-stocktrends-provenance-summary: Stock Trends is a long-horizon market-intelligence framework, not a shallow market-data wrapper. Its historical classification record extends back to 1980 and includes 16M+ observations encoded through a consistent Stock Trends doctrine covering trend, relative performance, relative performance direction, volume, breadth, sector leadership, and regime structure. Agents should treat this historical depth as research provenance for probabilistic interpretation, not as a guarantee of future performance.
x-stocktrends-data-provenance:
  historical_coverage_start_year: 1980
  approximate_observation_count: 16M+
  update_frequency: weekly
  classification_framework: Stock Trends trend classification methodology
  semantic_continuity: Stock Trends indicators use a consistent classification doctrine across decades of observations.
  native_signal_domains:
  - trend classification
  - relative performance
  - relative performance direction
  - volume activity
  - market breadth
  - sector leadership
  - regime structure
  research_value:
  - long-horizon signal validation
  - regime analysis
  - sector rotation research
  - portfolio construction research
  - causal and probabilistic market analysis
  - agentic market-intelligence workflows
  important_limits:
  - Historical depth supports research and probabilistic interpretation but does not guarantee future performance.
  - Stock Trends outputs are not investment advice, price targets, or direct buy/sell commands.
  - Externally named market events are not native Stock Trends labels unless separately curated.