The Quant Agent downloads OHLC candlestick data from Binance and applies two indicators — Wilder RSI and an exponential moving average — to produce a directional verdict for any trading pair. Stage 2/6 in the full Elyra pipeline runs it against BTCUSDT, but you can point it at any symbol Binance supports.Documentation Index
Fetch the complete documentation index at: https://docs.getelyra.xyz/llms.txt
Use this file to discover all available pages before exploring further.
CLI usage
Pass the trading pair as a positional argument:BTCUSDT.
Python usage
analyze_market()
Downloads up to limit candlesticks for symbol at the given interval, computes RSI and EMA, and returns a structured signal dictionary.
Signature
Parameters
Binance trading pair in uppercase (e.g.
"BTCUSDT", "ETHUSDT", "SOLUSDT"). Any valid Binance spot or futures symbol is accepted.Candlestick interval. Accepts any Binance kline interval string — common values are
"1m", "5m", "1h", "4h", "1d", "1w".Number of candlesticks to fetch from Binance (maximum 1000). Must be greater than
max(rsi_period, ema_period) + 1; otherwise the function returns "insufficient data".Lookback window for the Wilder RSI calculation.
Lookback window for the exponential moving average. Trend is determined by comparing the last close price against the last EMA value.
Return value
Returnsdict[str, str | int].
Directional bias derived by comparing the most recent close against the EMA. One of
"bullish" (close ≥ EMA) or "bearish" (close < EMA). Returns "neutral" when there is insufficient data.Most recent RSI value rounded to the nearest integer, in the range 0–100. Returns
50 when there is insufficient data.Human-readable trading signal derived from RSI and trend. Possible values:
| Value | Condition |
|---|---|
"overbought" | RSI ≥ 70 |
"oversold" | RSI ≤ 30 |
"possible breakout" | Trend is bullish and 50 < RSI < 70 |
"possible breakdown" | Trend is bearish and 30 < RSI < 50 |
"uptrend" | Trend is bullish and RSI ≤ 50 |
"downtrend" | Trend is bearish and RSI ≥ 50 |
"insufficient data" | Not enough candles to compute indicators |
Example response
Insufficient data response
Iflimit is smaller than max(rsi_period, ema_period) + 1, the function returns safe defaults instead of raising an exception:
Signal logic reference
The signal is computed in two steps: first determine trend from price vs. EMA, then apply RSI thresholds.No API key is required. Binance kline data is publicly accessible.