Get price events for a stock
curl --request GET \
--url https://api.example.com/api/graph/v1/stocks/{symbol}/price-eventsimport requests
url = "https://api.example.com/api/graph/v1/stocks/{symbol}/price-events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/stocks/{symbol}/price-events', 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}/price-events",
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}/price-events"
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}/price-events")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/stocks/{symbol}/price-events")
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[
{
"event_id": "<string>",
"event_type": "<string>",
"event_date": "2023-11-07T05:31:56Z",
"severity": "<string>",
"magnitude": 123,
"reference_price": 123,
"trigger_price": 123,
"level_name": "<string>",
"level_value": 123,
"rel_volume": 123,
"atr_ratio": 123,
"details": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Stocks
Get price events for a stock
Get price events detected by the Go pattern-detector for a specific stock.
## Event Categories
### Gap Events
- `gap_up`: Gap up > 1% from prior close
- `gap_down`: Gap down < -1% from prior close
### Breakout Events
- `breakout_52w_high`: New 52-week high
- `breakout_52w_low`: New 52-week low
- `breakout_ib_high`: Initial balance high breakout (after 10:30 ET)
- `breakout_ib_low`: Initial balance low breakdown (after 10:30 ET)
- `breakout_vwap`: VWAP cross
- `breakout_poc`: Point of control cross
- `breakout_pivot_r1`: R1 pivot breakout
- `breakout_pivot_s1`: S1 pivot breakdown
### MA Crossover Events
- `golden_cross`: SMA50 crosses above SMA200
- `death_cross`: SMA50 crosses below SMA200
- `ema_cross_bullish`: EMA9 crosses above EMA20
- `ema_cross_bearish`: EMA9 crosses below EMA20
### Volume Events
- `volume_spike`: RVOL >= 3.0
- `volume_climax`: RVOL >= 3.0 with significant price move
- `volume_dry_up`: RVOL <= 0.3
### Range Events
- `range_expansion`: Range > 2x ATR(14)
- `range_compression`: Range < 0.5x ATR(14)
- `inside_day`: Bar range contained within prior bar
- `outside_day`: Bar range exceeds prior bar in both directions
- `nr7_day`: Narrowest range of last 7 days
### Pattern Events
- `vcp_breakout`: Volatility contraction pattern breakout
- `flag_breakout`: Bull/bear flag breakout
- `triangle_breakout`: Triangle pattern breakout
## Severity Levels
- `low`: Minor event
- `medium`: Normal significance
- `high`: Important event
- `critical`: Highly significant event
## Query Parameters
- **days**: Number of days to look back (default 30, max 90)
- **event_types**: Comma-separated list of event types to filter
- **min_severity**: Minimum severity level (low, medium, high, critical)
## Performance Target
<100ms response time.
GET
/
api
/
graph
/
v1
/
stocks
/
{symbol}
/
price-events
Get price events for a stock
curl --request GET \
--url https://api.example.com/api/graph/v1/stocks/{symbol}/price-eventsimport requests
url = "https://api.example.com/api/graph/v1/stocks/{symbol}/price-events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/stocks/{symbol}/price-events', 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}/price-events",
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}/price-events"
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}/price-events")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/stocks/{symbol}/price-events")
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[
{
"event_id": "<string>",
"event_type": "<string>",
"event_date": "2023-11-07T05:31:56Z",
"severity": "<string>",
"magnitude": 123,
"reference_price": 123,
"trigger_price": 123,
"level_name": "<string>",
"level_value": 123,
"rel_volume": 123,
"atr_ratio": 123,
"details": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Query Parameters
Number of days to look back
Required range:
1 <= x <= 90Comma-separated event types to filter (e.g., gap_up,gap_down,golden_cross)
Minimum severity: low, medium, high, critical
Response
List of price events
Unique ID: {symbol}{type}{YYYYMMDD_HHMMSS}_{hash6}
Event type (gap_up, gap_down, breakout_52w_high, golden_cross, etc.)
Bar timestamp when event was detected
Event severity: low, medium, high, critical
Percentage change or ratio for the event
Prior price used for comparison
Price that triggered the event
Level crossed (52w_high, ib_low, vwap, etc.)
Value of the level that was crossed
Relative volume at time of event
Move size relative to ATR(14)
Human-readable event description