Get matching trading strategies
curl --request GET \
--url https://api.example.com/api/graph/v1/stocks/{symbol}/strategiesimport requests
url = "https://api.example.com/api/graph/v1/stocks/{symbol}/strategies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/stocks/{symbol}/strategies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/stocks/{symbol}/strategies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/stocks/{symbol}/strategies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/graph/v1/stocks/{symbol}/strategies")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/stocks/{symbol}/strategies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market_conditions": [
"LOW_VIX",
"UPTREND",
"HIGH_VOLUME"
],
"matches": [
{
"category": "momentum",
"direction": "bullish",
"match_score": 0.85,
"parameters": {
"delta_target": 0.4,
"ideal_iv_rank": 30,
"max_dte": 45,
"min_dte": 21,
"position_size_modifier": 1
},
"requirements_met": [
{
"actual": 1,
"indicator": "trend_stack_valid",
"satisfied": true,
"threshold": 1
},
{
"actual": 1.5,
"indicator": "rel_volume",
"satisfied": true,
"threshold": 1.2
}
],
"strategy": "MomentumBreakout"
}
],
"symbol": "AAPL"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Stocks
Get matching trading strategies
Find matching options strategies via graph traversal.
## Strategy Categories
- **momentum**: MomentumBreakout, TrendFollowing
- **mean_reversion**: MeanReversion, FadeTheMove
- **intraday**: VWAPBounce, OpeningRangeBreakout
- **volatility**: VolatilityCompression
- **level_based**: PivotPlay
## Match Scoring
Strategies are scored based on:
1. Requirement satisfaction (70% weight)
2. Market condition alignment (30% weight)
Only strategies with match_score >= 0.5 are returned.
## Response Includes
- Current market conditions inferred from stock data
- Matching strategies sorted by score
- For each strategy:
- Requirements met/not met
- Recommended parameters (DTE, delta, etc.)
- Position size modifier
## Performance Target
<300ms response time.
GET
/
api
/
graph
/
v1
/
stocks
/
{symbol}
/
strategies
Get matching trading strategies
curl --request GET \
--url https://api.example.com/api/graph/v1/stocks/{symbol}/strategiesimport requests
url = "https://api.example.com/api/graph/v1/stocks/{symbol}/strategies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/stocks/{symbol}/strategies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/stocks/{symbol}/strategies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/stocks/{symbol}/strategies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/graph/v1/stocks/{symbol}/strategies")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/stocks/{symbol}/strategies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market_conditions": [
"LOW_VIX",
"UPTREND",
"HIGH_VOLUME"
],
"matches": [
{
"category": "momentum",
"direction": "bullish",
"match_score": 0.85,
"parameters": {
"delta_target": 0.4,
"ideal_iv_rank": 30,
"max_dte": 45,
"min_dte": 21,
"position_size_modifier": 1
},
"requirements_met": [
{
"actual": 1,
"indicator": "trend_stack_valid",
"satisfied": true,
"threshold": 1
},
{
"actual": 1.5,
"indicator": "rel_volume",
"satisfied": true,
"threshold": 1.2
}
],
"strategy": "MomentumBreakout"
}
],
"symbol": "AAPL"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Strategy matches
Options strategy recommendations based on current market conditions.
Matches are produced by strategy_service.get_strategy_matches(), which
evaluates a static rule table (the STRATEGIES dict) against the stock's
current indicator values and market conditions. This does NOT use the
knowledge graph; an earlier graph-traversal design (Strategy REQUIRES /
WORKS_IN_CONDITION edges) was specced but never implemented.