Levels

Market-structure support and resistance, the exact lines drawn on Osiris charts: unbroken swing pivots across five timeframes plus the previous day's and week's extremes, clustered into zones and refreshed every minute.

GET/v1/levels/{symbol}
GET/v1/levels

Support and resistance is the most-used and worst-automated concept in technical analysis: most "S/R indicators" just draw recent highs and lows and let them linger after price has blown through. The Osiris levels engine is built around a stricter definition that matches how experienced scalpers actually read a chart: a level is a previous extreme that still matters. This endpoint returns those levels, per pair or for the whole market in one call.

How levels are detected

1. Fractal swing pivots, five timeframes

On each of 15m, 1h, 4h, 1d and 1w, the engine scans hundreds of bars of history for fractal pivots: a bar whose high is the highest within 2 bars on each side is a swing high; mirrored for lows. This finds the turning points a human eye picks out, not arbitrary lookback maxima.

2. The unbroken rule

A pivot remains a level only while price has never traded through it since. The moment any later candle (including the live one) crosses a pivot, that level is consumed and disappears from the response. This is the property that keeps the set honest: what you receive is only structure the market still respects. It also means months-old levels survive when they should: a high from last winter that no rally ever reclaimed is still resistance, and it will be in the list.

3. Previous day & week extremes

The previous completed day's high/low and week's high/low join the set with dedicated timeframe tags (dmax/dmin, wmax/wmin). These reference prices anchor intraday trading worldwide ("yesterday's high" needs no introduction) and get major-level treatment.

4. Clustering into zones

Real structure is zones, not lines: three pivots within 0.4% of each other are one area of interest tested three times, not three separate levels. The engine clusters accordingly, with a hierarchy: major levels (4h, 1d, 1w, day/week extremes) always keep their own price, with the higher timeframe winning overlaps; minor levels (15m, 1h) collapse to the zone's outer edge relative to current price; a minor zone sitting on a major merges into it and feeds its strength. Every merge increments the zone's strength; a strength-4 level is structure confirmed four times over.

5. Final selection

The list is curated at computation time, so every consumer (site charts, this API, the alert engine) sees the same picture: every major zone survives at any distance; minor zones only within ±8% of price, nearest-first, within a budget of ~8 near-price lines; and each side of the price is guaranteed its 2 nearest zones however far away, so the response always answers "what's above me, what's below me".

Request

ParameterInDescription
exchangequeryVenue whose candles the structure is read from. See Exchanges. Default: Binance.
One pair, or the whole market keyed by symbol
curl "https://osiristrader.com/api/v1/levels/BTCUSDT" \
  -H "Authorization: Bearer osk_YOUR_KEY"

curl "https://osiristrader.com/api/v1/levels" \
  -H "Authorization: Bearer osk_YOUR_KEY"

Response

{
  "symbol": "BTCUSDT",
  "data": [
    { "price": 64850.0, "type": "resistance", "side": "high", "timeframe": "4h",   "time": 1783650000000, "strength": 3 },
    { "price": 64210.5, "type": "resistance", "side": "high", "timeframe": "dmax", "time": 1783785600000, "strength": 1 },
    { "price": 63120.0, "type": "support",    "side": "low",  "timeframe": "1d",   "time": 1783094400000, "strength": 2 },
    { "price": 61980.0, "type": "support",    "side": "low",  "timeframe": "wmin", "time": 1782950400000, "strength": 1 }
  ]
}
FieldDescription
priceThe zone's price.
typesupport / resistance, relative to the current price (below / above). Flips automatically if price crosses without consuming the level.
sideThe formation side: born a swing high or a swing low. A former swing high now acting as support (broken-and-retested) is visible as side: "high", type: "support".
timeframe15m 1h 4h 1d 1w for pivots; dmax dmin wmax wmin for the previous day/week extremes. Higher timeframe = more significant.
timeOpen time (ms) of the bar that formed the level, i.e. its age.
strengthHow many raw levels merged into this zone. 1 = a lone pivot; higher = confluence.

Levels are ordered by distance from the current price, nearest first: data[0] is the closest structure in either direction.

Usage patterns

  • Trade context: before entering, check the nearest opposing zone: a long into a strength-4 daily resistance 0.3% away has its risk/reward written down for you.
  • Breakout watching: poll a pair's levels each minute; a level that disappears was consumed: price traded through it. That disappearance is the breakout event.
  • Confluence scans: join with Densities: a live order-book wall within 0.1% of a structural level is the strongest S/R signal this API offers.
  • Alert placement: feed a level's price straight into an alert with a webhook and let the engine watch the retest for you.
The whole-market form returns only pairs that currently have levels; freshly listed pairs need enough bars to form pivots first. Levels recompute every 60 seconds; the timeframe of the underlying structure means faster polling buys nothing.