Stock Trends Stocktrends Strategies API
The stocktrends-strategies API from Stock Trends — 3 operation(s) for stocktrends-strategies.
The stocktrends-strategies API from Stock Trends — 3 operation(s) for stocktrends-strategies.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/stocktrends-com:stocktrends-com-stocktrends-strategies-api"
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.
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: 3.2.0
info:
title: Stock Trends API v1 Stocktrends Strategies 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: stocktrends-strategies
paths:
/stocktrends/strategies:
get:
tags:
- stocktrends-strategies
summary: List official Stock Trends strategy metadata
description: Public/free strategy metadata for official Stock Trends model portfolios. Returns declared buy/sell condition counts and economic assumptions for provenance and verification. Conditions are metadata, not executable APIs; this route does not evaluate current matching stocks and does not return current live holdings.
operationId: list_stocktrends_strategies_stocktrends_strategies_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StockTrendsStrategyListResponse'
security: []
parameters:
- $ref: '#/components/parameters/StockTrendsAgentId'
- $ref: '#/components/parameters/StockTrendsAgentType'
- $ref: '#/components/parameters/StockTrendsAgentVendor'
- $ref: '#/components/parameters/StockTrendsAgentVersion'
- $ref: '#/components/parameters/StockTrendsRequestPurpose'
- $ref: '#/components/parameters/StockTrendsSessionId'
- $ref: '#/components/parameters/StockTrendsPaymentMethod'
- $ref: '#/components/parameters/StockTrendsPaymentNetwork'
- $ref: '#/components/parameters/StockTrendsPaymentToken'
- $ref: '#/components/parameters/StockTrendsPaymentReference'
- $ref: '#/components/parameters/StockTrendsPaymentAmount'
/stocktrends/strategies/{strategy_id}:
get:
tags:
- stocktrends-strategies
summary: Get official Stock Trends strategy metadata
description: Public/free strategy metadata for one official Stock Trends strategy. Returns declared economic assumptions and legacy buy/sell condition expressions for portfolio provenance. These conditions are metadata and are not executable query endpoints; this route does not evaluate current matches, current buy candidates, current sell candidates, or current live holdings.
operationId: get_stocktrends_strategy_stocktrends_strategies__strategy_id__get
parameters:
- name: strategy_id
in: path
required: true
schema:
type: integer
minimum: 1
description: Legacy Stock Trends strategy identifier.
title: Strategy Id
description: Legacy Stock Trends strategy identifier.
- $ref: '#/components/parameters/StockTrendsAgentId'
- $ref: '#/components/parameters/StockTrendsAgentType'
- $ref: '#/components/parameters/StockTrendsAgentVendor'
- $ref: '#/components/parameters/StockTrendsAgentVersion'
- $ref: '#/components/parameters/StockTrendsRequestPurpose'
- $ref: '#/components/parameters/StockTrendsSessionId'
- $ref: '#/components/parameters/StockTrendsPaymentMethod'
- $ref: '#/components/parameters/StockTrendsPaymentNetwork'
- $ref: '#/components/parameters/StockTrendsPaymentToken'
- $ref: '#/components/parameters/StockTrendsPaymentReference'
- $ref: '#/components/parameters/StockTrendsPaymentAmount'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StockTrendsStrategyDetailResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security: []
/stocktrends/portfolios/{port_id}/strategy:
get:
tags:
- stocktrends-strategies
summary: Get official Stock Trends portfolio strategy provenance
description: Public/free portfolio-to-strategy provenance for one live official Stock Trends model portfolio. Joins the portfolio strategy identifier to the declared strategy metadata and legacy buy/sell condition expressions. Conditions are metadata, not executable APIs; this route does not return current matching stocks, current live holdings, current buy candidates, or current sell candidates.
operationId: get_stocktrends_portfolio_strategy_stocktrends_portfolios__port_id__strategy_get
parameters:
- name: port_id
in: path
required: true
schema:
type: integer
minimum: 1
description: Official Stock Trends portfolio identifier.
title: Port Id
description: Official Stock Trends portfolio identifier.
- $ref: '#/components/parameters/StockTrendsAgentId'
- $ref: '#/components/parameters/StockTrendsAgentType'
- $ref: '#/components/parameters/StockTrendsAgentVendor'
- $ref: '#/components/parameters/StockTrendsAgentVersion'
- $ref: '#/components/parameters/StockTrendsRequestPurpose'
- $ref: '#/components/parameters/StockTrendsSessionId'
- $ref: '#/components/parameters/StockTrendsPaymentMethod'
- $ref: '#/components/parameters/StockTrendsPaymentNetwork'
- $ref: '#/components/parameters/StockTrendsPaymentToken'
- $ref: '#/components/parameters/StockTrendsPaymentReference'
- $ref: '#/components/parameters/StockTrendsPaymentAmount'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StockTrendsPortfolioStrategyResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security: []
components:
parameters:
StockTrendsPaymentReference:
name: X-StockTrends-Payment-Reference
in: header
required: false
schema:
type: string
StockTrendsAgentType:
name: X-StockTrends-Agent-Type
in: header
required: false
schema:
type: string
StockTrendsAgentVendor:
name: X-StockTrends-Agent-Vendor
in: header
required: false
schema:
type: string
StockTrendsRequestPurpose:
name: X-StockTrends-Request-Purpose
in: header
required: false
schema:
type: string
StockTrendsPaymentToken:
name: X-StockTrends-Payment-Token
in: header
required: false
schema:
type: string
StockTrendsSessionId:
name: X-StockTrends-Session-Id
in: header
required: false
schema:
type: string
StockTrendsPaymentMethod:
name: X-StockTrends-Payment-Method
in: header
required: false
schema:
type: string
StockTrendsPaymentAmount:
name: X-StockTrends-Payment-Amount
in: header
required: false
schema:
type: string
StockTrendsPaymentNetwork:
name: X-StockTrends-Payment-Network
in: header
required: false
schema:
type: string
StockTrendsAgentVersion:
name: X-StockTrends-Agent-Version
in: header
required: false
schema:
type: string
StockTrendsAgentId:
name: X-StockTrends-Agent-Id
in: header
required: false
schema:
type: string
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
StockTrendsPortfolioStrategyResponse:
properties:
request_id:
type: string
title: Request Id
port_id:
type: integer
title: Port Id
portfolio:
$ref: '#/components/schemas/StockTrendsPortfolioStrategyPortfolio'
strategy:
$ref: '#/components/schemas/StockTrendsPortfolioStrategyData'
verification:
$ref: '#/components/schemas/StockTrendsPortfolioStrategyVerification'
type: object
required:
- request_id
- port_id
- portfolio
- strategy
- verification
title: StockTrendsPortfolioStrategyResponse
StockTrendsStrategyConditions:
properties:
buy:
items:
$ref: '#/components/schemas/StockTrendsStrategyCondition'
type: array
title: Buy
sell:
items:
$ref: '#/components/schemas/StockTrendsStrategyCondition'
type: array
title: Sell
type: object
required:
- buy
- sell
title: StockTrendsStrategyConditions
StockTrendsStrategyDetailResponse:
properties:
request_id:
type: string
title: Request Id
strategy_id:
type: integer
title: Strategy Id
data:
$ref: '#/components/schemas/StockTrendsStrategyDetailData'
type: object
required:
- request_id
- strategy_id
- data
title: StockTrendsStrategyDetailResponse
StockTrendsStrategyDetailData:
properties:
strategy_id:
type: integer
title: Strategy Id
description:
anyOf:
- type: string
- type: 'null'
title: Description
investment_amount:
anyOf:
- type: number
- type: 'null'
title: Investment Amount
transaction_cost_pct:
anyOf:
- type: number
- type: 'null'
title: Transaction Cost Pct
round_trip_transaction_cost_pct:
anyOf:
- type: number
- type: 'null'
title: Round Trip Transaction Cost Pct
stop_loss_pct:
anyOf:
- type: number
- type: 'null'
title: Stop Loss Pct
stop_loss_minimum:
anyOf:
- type: number
- type: 'null'
title: Stop Loss Minimum
conditions:
$ref: '#/components/schemas/StockTrendsStrategyConditions'
public_verification:
$ref: '#/components/schemas/StockTrendsStrategyPublicVerification'
type: object
required:
- strategy_id
- description
- investment_amount
- transaction_cost_pct
- round_trip_transaction_cost_pct
- stop_loss_pct
- stop_loss_minimum
- conditions
- public_verification
title: StockTrendsStrategyDetailData
StockTrendsPortfolioStrategyVerification:
properties:
portfolio_metadata_endpoint:
type: string
title: Portfolio Metadata Endpoint
portfolio_returns_endpoint:
type: string
title: Portfolio Returns Endpoint
historical_positions_endpoint:
type: string
title: Historical Positions Endpoint
summary_endpoint:
type: string
title: Summary Endpoint
current_live_holdings_excluded:
type: boolean
title: Current Live Holdings Excluded
current_matching_candidates_excluded:
type: boolean
title: Current Matching Candidates Excluded
conditions_are_metadata_not_executable_api:
type: boolean
title: Conditions Are Metadata Not Executable Api
type: object
required:
- portfolio_metadata_endpoint
- portfolio_returns_endpoint
- historical_positions_endpoint
- summary_endpoint
- current_live_holdings_excluded
- current_matching_candidates_excluded
- conditions_are_metadata_not_executable_api
title: StockTrendsPortfolioStrategyVerification
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
StockTrendsStrategyListResponse:
properties:
request_id:
type: string
title: Request Id
count:
type: integer
title: Count
data:
items:
$ref: '#/components/schemas/StockTrendsStrategySummary'
type: array
title: Data
type: object
required:
- request_id
- count
- data
title: StockTrendsStrategyListResponse
StockTrendsStrategyPublicVerification:
properties:
related_portfolios_endpoint:
type: string
title: Related Portfolios Endpoint
description: Public endpoint for official Stock Trends model portfolio metadata.
portfolio_strategy_endpoint_template:
type: string
title: Portfolio Strategy Endpoint Template
description: Public endpoint template for portfolio-to-strategy provenance.
current_live_holdings_excluded:
type: boolean
title: Current Live Holdings Excluded
description: True when current live holdings are excluded from this metadata surface.
conditions_are_metadata_not_executable_api:
type: boolean
title: Conditions Are Metadata Not Executable Api
description: True when strategy conditions are exposed only as provenance metadata.
type: object
required:
- related_portfolios_endpoint
- portfolio_strategy_endpoint_template
- current_live_holdings_excluded
- conditions_are_metadata_not_executable_api
title: StockTrendsStrategyPublicVerification
StockTrendsPortfolioStrategyData:
properties:
strategy_id:
type: integer
title: Strategy Id
description:
anyOf:
- type: string
- type: 'null'
title: Description
investment_amount:
anyOf:
- type: number
- type: 'null'
title: Investment Amount
transaction_cost_pct:
anyOf:
- type: number
- type: 'null'
title: Transaction Cost Pct
round_trip_transaction_cost_pct:
anyOf:
- type: number
- type: 'null'
title: Round Trip Transaction Cost Pct
stop_loss_pct:
anyOf:
- type: number
- type: 'null'
title: Stop Loss Pct
stop_loss_minimum:
anyOf:
- type: number
- type: 'null'
title: Stop Loss Minimum
conditions:
$ref: '#/components/schemas/StockTrendsStrategyConditions'
type: object
required:
- strategy_id
- description
- investment_amount
- transaction_cost_pct
- round_trip_transaction_cost_pct
- stop_loss_pct
- stop_loss_minimum
- conditions
title: StockTrendsPortfolioStrategyData
StockTrendsStrategyCondition:
properties:
sequence:
type: integer
title: Sequence
description: Deterministic alphabetical sequence within the buy or sell condition group. This does not imply strategy evaluation order.
left_side:
anyOf:
- type: string
- type: 'null'
title: Left Side
description: Legacy left-side condition expression.
operator:
anyOf:
- type: string
- type: 'null'
title: Operator
description: Legacy condition operator.
right_side:
anyOf:
- type: string
- type: 'null'
title: Right Side
description: Legacy right-side condition expression.
sell_trigger:
anyOf:
- type: string
- type: 'null'
title: Sell Trigger
description: Legacy sell-trigger code attached to sell rows.
legacy_expression:
anyOf:
- type: string
- type: 'null'
title: Legacy Expression
description: Null-safe legacy expression assembled as left_side, operator, and right_side metadata.
type: object
required:
- sequence
title: StockTrendsStrategyCondition
StockTrendsStrategyConditionCounts:
properties:
buy:
type: integer
title: Buy
description: Number of declared buy-condition metadata rows.
sell:
type: integer
title: Sell
description: Number of declared sell-condition metadata rows.
total:
type: integer
title: Total
description: Total declared condition metadata rows.
type: object
required:
- buy
- sell
- total
title: StockTrendsStrategyConditionCounts
StockTrendsPortfolioStrategyPortfolio:
properties:
port_id:
type: integer
title: Port Id
description: Official Stock Trends portfolio identifier.
name:
anyOf:
- type: string
- type: 'null'
title: Name
description: Official Stock Trends portfolio name.
strategy_id:
anyOf:
- type: integer
- type: 'null'
title: Strategy Id
description: Legacy strategy identifier configured for the portfolio.
selection_universe:
anyOf:
- type: string
- type: 'null'
title: Selection Universe
description: Stock Trends strategy selection/filter universe configured for the portfolio.
type: object
required:
- port_id
title: StockTrendsPortfolioStrategyPortfolio
StockTrendsStrategySummary:
properties:
strategy_id:
type: integer
title: Strategy Id
description: Legacy Stock Trends strategy identifier.
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Legacy Stock Trends strategy description.
investment_amount:
anyOf:
- type: number
- type: 'null'
title: Investment Amount
description: Declared investment amount per position for this strategy.
transaction_cost_pct:
anyOf:
- type: number
- type: 'null'
title: Transaction Cost Pct
description: Declared transaction-cost percentage estimate per trade side.
round_trip_transaction_cost_pct:
anyOf:
- type: number
- type: 'null'
title: Round Trip Transaction Cost Pct
description: Approximate round-trip transaction-cost percentage derived from the per-side estimate.
stop_loss_pct:
anyOf:
- type: number
- type: 'null'
title: Stop Loss Pct
description: Declared stop-loss percentage.
stop_loss_minimum:
anyOf:
- type: number
- type: 'null'
title: Stop Loss Minimum
description: Declared minimum stop-loss value.
condition_counts:
$ref: '#/components/schemas/StockTrendsStrategyConditionCounts'
type: object
required:
- strategy_id
- condition_counts
title: StockTrendsStrategySummary
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.