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
SMA
TrendSimple Moving Average - Averages closing prices over a specified period to smooth out price fluctuations.
EMA
TrendExponential Moving Average - Gives more weight to recent prices for more responsive trend signals.
MACD
TrendMoving Average Convergence Divergence - Shows relationship between two EMAs to identify trend changes.
RSI
MomentumRelative Strength Index - Measures speed and change of price movements (0-100 scale).
Stochastic
MomentumStochastic Oscillator - Compares closing price to price range over time.
Williams %R
MomentumMeasures overbought and oversold levels similar to Stochastic but plotted inversely.
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
BullishThree White Soldiers
BullishThree Black Crows
BearishInverse Hammer
BullishAscending Breakout Channel
BullishDescending Breakout Channel
BearishDouble Top
BearishDouble Bottom
BullishSample 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
BullishShooting Star
BearishInverse Hammer
BullishBullish Piercing
BullishBearish Piercing
BearishBullish Engulfing
BullishBearish Engulfing
BearishMorning Star
BullishEvening Star
BearishDoji
NeutralSample 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}
]
}