Stockyfly API Documentation

Unlock powerful trading insights with our comprehensive APIs for historical data, open interest, technical indicators, price action, and candlestick patterns.

Why Choose Our API?

Power your trading applications with our high-performance financial data API

Lightning Fast

Ultra-low latency with response times under 50ms globally, powered by edge computing

Comprehensive

20+ years of historical data across stocks, forex, commodities, and cryptocurrencies

Flexible

Supports REST for simple requests and WebSocket for real-time streaming data

Reliable

99.99% uptime with enterprise-grade infrastructure and automatic failover

Historical Data

Access daily, weekly, or monthly OHLC (Open, High, Low, Close) data for stocks, futures, and options. Historical data helps traders analyze past price movements to predict future trends.

Sample Response:


{
    "symbol": "AAPL",
    "data": [
        {"date": "2025-04-01", "open": 150.00, "high": 152.50, "low": 149.00, "close": 151.75, "volume": 1000000},
        {"date": "2025-04-02", "open": 151.80, "high": 153.00, "low": 150.50, "close": 152.25, "volume": 1200000}
    ]
}

Open Interest Data

Open Interest represents the total number of open contracts in futures and options markets. It indicates market participation and liquidity, helping traders gauge bullish or bearish sentiment.

Sample Response:


{
    "symbol": "AAPL",
    "data": [
        {"date": "2025-04-01", "open": 150.00, "high": 152.50, "low": 149.00, "close": 151.75, "volume": 1000000},
        {"date": "2025-04-02", "open": 151.80, "high": 153.00, "low": 150.50, "close": 152.25, "volume": 1200000}
    ]
}

Technical Indicators Data

Power your analysis with our comprehensive suite of pre-calculated technical indicators

Trend Indicators
Momentum Indicators
Volatility Indicators
Volume Indicators

SMA

Trend

Simple Moving Average - Averages closing prices over a specified period to smooth out price fluctuations.

Common periods: 20, 50, 100, 200 Usage: Trend identification

EMA

Trend

Exponential Moving Average - Gives more weight to recent prices for more responsive trend signals.

Common periods: 12, 26, 50 Usage: Short-term trends

MACD

Trend

Moving Average Convergence Divergence - Shows relationship between two EMAs to identify trend changes.

Components: MACD line, Signal line, Histogram Usage: Trend reversals

RSI

Momentum

Relative Strength Index - Measures speed and change of price movements (0-100 scale).

Range: 0-100 (Overbought >70, Oversold <30)< /span> Usage: Overbought/Oversold

Stochastic

Momentum

Stochastic Oscillator - Compares closing price to price range over time.

Range: 0-100 (Overbought >80, Oversold <20)< /span> Usage: Reversal signals

Williams %R

Momentum

Measures overbought and oversold levels similar to Stochastic but plotted inversely.

Range: -100 to 0 (Overbought >-20, Oversold <-80)< /span> Usage: Extreme conditions

API Response Example

{
    "symbol": "AAPL",
    "timeframe": "1D",
    "indicators": {
        "trend": {
            "sma_50": 150.25,
            "ema_20": 151.10,
            "macd": {
                "value": 1.25,
                "signal": 1.10,
                "histogram": 0.15
            }
        },
        "momentum": {
            "rsi": 65.5,
            "stochastic": {
                "k": 72.3,
                "d": 68.4
            },
            "williams_r": -34.2
        },
        "volatility": {
            "atr": 3.45,
            "bollinger": {
                "upper": 155.60,
                "middle": 150.25,
                "lower": 144.90,
                "bandwidth": 7.1
            }
        }
    }
}
import requests

url = "https://api.marketdata.com/v1/indicators"
params = {
    "symbol": "AAPL",
    "timeframe": "1D",
    "indicators": "sma,ema,rsi,macd"
}

headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, params=params, headers=headers)
data = response.json()

print(f"AAPL 50-day SMA: {data['indicators']['trend']['sma_50']}")
print(f"AAPL RSI: {data['indicators']['momentum']['rsi']}")
curl -X GET \
  'https://api.marketdata.com/v1/indicators?symbol=AAPL&timeframe=1D&indicators=sma,ema,rsi,macd' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Price Action Data

Price Action Data provides insights into market movements through patterns formed by price behavior. Explore our supported patterns below, filterable by type.

Hammer

Bullish

Three White Soldiers

Bullish

Three Black Crows

Bearish

Inverse Hammer

Bullish

Ascending Breakout Channel

Bullish

Descending Breakout Channel

Bearish

Double Top

Bearish

Double Bottom

Bullish
Sample Response

{
    "symbol": "AAPL",
    "data": [
        {"date": "2025-04-01", "open": 150.00, "high": 152.50, "low": 149.00, "close": 151.75, "volume": 1000000},
        {"date": "2025-04-02", "open": 151.80, "high": 153.00, "low": 150.50, "close": 152.25, "volume": 1200000}
    ]
}

Candlestick Data

Candlestick Data identifies patterns formed by OHLC prices to predict market reversals or continuations. Explore our supported patterns below, filterable by type.

Hammer

Bullish

Shooting Star

Bearish

Inverse Hammer

Bullish

Bullish Piercing

Bullish

Bearish Piercing

Bearish

Bullish Engulfing

Bullish

Bearish Engulfing

Bearish

Morning Star

Bullish

Evening Star

Bearish

Doji

Neutral
Sample Response

{
    "symbol": "AAPL",
    "data": [
        {"date": "2025-04-01", "open": 150.00, "high": 152.50, "low": 149.00, "close": 151.75, "volume": 1000000},
        {"date": "2025-04-02", "open": 151.80, "high": 153.00, "low": 150.50, "close": 152.25, "volume": 1200000}
    ]
}