Price channels API
Read stored price-channel fits, direction, bands, and data freshness.
GET
/api/channelsRead price channels
Retrieve stored price-channel fits for a symbol. Use the fitted bands and timestamps to inspect market structure; this request does not calculate a new channel or place an order.
Parameters
symbolstring · query · required- Required market symbol, for example AAPL. Converted to uppercase.
timeframestring · query · optional- Optional stored timeframe, for example 1D. Converted to uppercase; omission includes all timeframes.
windowSizeinteger · query · optional- Optional fitting-window length in bars. Use a whole number of at least 2.
directionstring · query · optional- Optional channel direction. Use horizontal, not flat, on this API host.
validstring · query · optional- Optional validity filter. true/1/yes and false/0/no are recognised; other values leave this filter unset.
limitinteger · query · optional- Maximum rows. Defaults to 100, clamped to 1–500. Use a whole number.
Behaviour and limits
- Use https://api.weavers.app. The website's /api/channels helper has different parameters and is not this contract.
- Rows are ordered by endTimestamp, newest first. No cursor pagination is supported.
- An empty array means no stored matches. Check computedAt and dataSource before assuming freshness; this is not a real-time feed.
- Some absent numeric channel values are currently normalised to zero. A zero is not proof of a measured result.
Error responses
400- Missing symbol, invalid direction or windowSize below 2.
500- failed_to_fetch_channels
Validation may also return a general request error. See error handling and rate limits.
Read price channels · cURL
curl --fail-with-body 'https://api.weavers.app/api/channels?symbol=AAPL&limit=5'Read price channels · JavaScript
const response = await fetch("https://api.weavers.app/api/channels?symbol=AAPL&limit=5", {
signal: AbortSignal.timeout(15000),
});
if (!response.ok) {
throw new Error(`Weavers API returned ${response.status}`);
}
const data = await response.json();
console.log(data);Read price channels · Python
import json
from urllib.request import urlopen
with urlopen("https://api.weavers.app/api/channels?symbol=AAPL&limit=5", timeout=15) as response:
data = json.load(response)
print(data)200 · Illustrative response
{
"symbol": "AAPL",
"channels": [
{
"id": 1,
"timeframe": "1D",
"windowSize": 20,
"direction": "ascending",
"isValid": true,
"startDay": "2026-01-01",
"endDay": "2026-01-28"
}
]
}Example data is illustrative. Additional response fields may be present. Empty lists are valid responses.
Response fields
| Field | Type | Meaning |
|---|---|---|
symbol | string | Requested symbol in uppercase. |
timeframe | string | Echoed only when supplied. |
windowSize | integer | Echoed only when supplied. |
channels | object[] | See the nested fields below. |
channels[].id | integer | Channel identifier. |
channels[].indexId | integer | Market-index identifier. |
channels[].timeframe | string | Stored bar timeframe, for example 1D. |
channels[].windowSize | integer | Number of bars in the fitting window. |
channels[].startTimestamp | string | null | ISO 8601 timestamp. |
channels[].endTimestamp | string | null | ISO 8601 timestamp. |
channels[].startDay | string | null | Calendar date in YYYY-MM-DD format. |
channels[].endDay | string | null | Calendar date in YYYY-MM-DD format. |
channels[].direction | string | Stored direction: ascending, descending or horizontal. |
channels[].isValid | boolean | Whether the channel passes the channel algorithm's validity criteria. |
channels[].slope | number | Fitted centre-line slope per algorithm coordinate step. |
channels[].intercept | number | Fitted centre-line intercept. |
channels[].upperOffset | number | Upper band offset. |
channels[].lowerOffset | number | Lower band offset. |
channels[].startMid | number | Centre-line price at the start. |
channels[].endMid | number | Centre-line price at the end. |
channels[].startUpper | number | Upper-band starting price. |
channels[].endUpper | number | Upper-band ending price. |
channels[].startLower | number | Lower-band starting price. |
channels[].endLower | number | Lower-band ending price. |
channels[].r2 | number | Coefficient of determination for the fit. |
channels[].inBandRatio | number | Fraction of points within the bands. |
channels[].points | integer | Number of fitted points. |
channels[].algoVersion | string | Algorithm version. |
channels[].dataSource | string | Data provider/source label. |
channels[].computedAt | string | null | ISO 8601 timestamp. |