Crypto market data API · v1

Market data API you can trust

Market Oracle is a REST and WebSocket crypto market data API for trading systems and AI agents: closed bars, verified indicators, order-book microstructure, macro context, and market regime. One request. You make the decisions — we supply facts only.

Documentation →
1request instead of 8–10
8timeframes with indicators
6trading pairs in the API
≥70data_quality gate
BTCUSDT READY live
Close (1m, closed)$81,681.27 +0.03%
RSI14 / ADX1444.4 / 22.0
ATR_PCT (1m)0.037%
Depth imbalance0.19 · ask pressure
H1 vs EMA50H1 below EMA50
Funding0.0077%
Fear & Greed50 · Neutral
Volatility regimelow_vol_range
Data quality
Score90
Live GET /v1/context/BTCUSDT via site PHP — bar · htf · depth · macro · regime
Principles

Not an advisor. A facts provider.

Oracle does not open trades or manage positions. Its job is to give your algorithms correct data you can build decisions on.

🎯

Signal only on a closed bar

Trading decisions are formed exclusively on a closed 1m bar (closed: true). No look-ahead — data is always point-in-time correct.

🧮

Verified correctness

EMA, RSI, ATR, ADX(+DI), VWAP, Bollinger, OBV, MFI, and CVD are computed on every native TF and covered by tests. Closed bars and indicators are stored atomically; state recovers after failures.

🤖

Built for agents

One call to GET /v1/context/{symbol} returns everything for a decision: bar, order book, derivatives, macro, and market regime. Machine-readable formats, explicit limits, predictable errors.

Features

Everything for a trading decision — in one API

Context, quotes, and history work only for these symbols. You cannot add your own ticker; check ready via GET /v1/symbols.

BTCUSDTETHUSDTSOLUSDTBNBUSDTDOGEUSDTXRPUSDT
⚡

Context in one request

The main endpoint for bots and AI agents. Bar with indicators, ticker, live order book, trade_cost / cost_risk, live HTF, derivatives, macro, quote check, market regime, and data_quality — instead of 8–10 separate calls.

GET /v1/context/{symbol}

The only signal source is a closed bar (closed: true). Everything else is filters: tradable, a macro pause, data_quality.score ≥ 70.

📊

Indicators on every TF

The same core on 1m and on native 5m/15m/30m/1h/4h/1d/1w. Decimal strings; during warmup a field is null, not zero.

EMA20/50/200RSI14ATR14/50ADX+DIVWAPBB 20,2OBVMFI14CVDswings
🧱

Microstructure

Closed minute aggregation of top-20: spread, imbalance, walls, pressure.

/v1/microstructure/{symbol}
🌍

Macro context

Fear&Greed, dominance, stablecoins, DXY, 10Y yield.

/v1/macro
🔥

Derivatives

Funding, open interest, liquidation cascades.

/v1/derivatives/{symbol}
🧭

Market regime

Correlation with BTC, realized vol, market breadth.

/v1/market-regime
🔗

Price consensus

Median-mid across independent sources with divergence control — protection against a bad tick before entry. Symbol must be from the list above.

/v1/quotes/{symbol}
📡

WebSocket

bar_close + opt-in microstructure_close; REST to recover gaps.

WS /v1/stream
🗓

Macro calendar

Upcoming events (FOMC, CPI) with impact level.

/v1/calendar
📚

History for all timeframes

Native candles, not stitched minutes: 5m 60d, 15m 90d, 30m 120d, 1h ~9 mo, 4h 2y, 1d 3y, 1w 5y. WS closes 1m only.

/v1/history/{symbol}?interval=…
How it works

Six steps from connect to signal

A typical flow for an AI agent or trading bot.

Start with an API key mo_… (“Get API key”). Every /v1/* call and the WebSocket then send Authorization: Bearer mo_…. Without a key there are no bars, context, or stream. Only GET /health is public.

GET /health

Check the server

Confirm status=ok and that bars are fresh.

GET /v1/me

Check your plan

Daily limits, RPM, WS count, and key expiry — so you can pick a request cadence.

GET /v1/symbols

Pick pairs

Only the core set (BTC, ETH, SOL, BNB, DOGE, XRP) and only ready=true, ideally history=full_day.

WS /v1/stream

Subscribe

Receive bar_close in real time. Order book optionally via microstructure:true.

GET /v1/context

Decision snapshot

Before entry: cost, HTF, quality. Enter only if tradable and score ≥ 70.

signal

Form a signal

Exactly once per closed bar, with deduplication by symbol:ts.

Pricing

Transparent limits. No sign-ups or dashboards.

Get an API key — and go. Everything is managed from one page.

Free
0 ₽ / forever
  • ✓2,000 requests per day
  • ✓30 requests per minute
  • ✓Min. pause between requests 2000 ms
  • ✓1 WebSocket connection
  • ✓BTCUSDT only
Basic
4 990 ₽ / mo
  • ✓5,000 requests per day
  • ✓60 requests per minute
  • ✓Min. pause between requests 200 ms
  • ✓2 WebSocket connections
  • ✓WS bar_close does not spend daily quota
Pro
6 490 ₽ / mo
  • ✓8,000 requests per day
  • ✓90 requests per minute
  • ✓Min. pause between requests 150 ms
  • ✓3 WebSocket connections
  • ✓Highest client tier

Already have a key?

Paid plans: RUB only, Russian-issued MIR, Visa and Mastercard (banks of the Russian Federation) or SBP. Foreign cards are not accepted. The service is delivered by email (API key). Terms: license agreement (public offer).

Documentation

Full integration specification

The manual is written so a developer can connect Oracle without extra questions. For an AI agent, feed the Markdown spec — link below.

📖
REST API referenceAll endpoints with request/response examples and field explanations.
📡
WebSocket protocolSubscribe, bar_close and microstructure_close events, reconnect with backoff.
🧮
Bar and indicator formatsDecimal strings for precision, semantics of each indicator.
⚠️
Limits and errorsPlans, daily limits, RPM, handling 429 and key_expired.
Open documentation → Agent spec (Markdown) llms.txt
oracle-client
# Python — standard library only
import json, urllib.request

BASE = "https://api.market-oracle.pro"
KEY = "mo_…"

req = urllib.request.Request(BASE + "/v1/context/BTCUSDT",
    headers={"Authorization": f"Bearer {KEY}"})
with urllib.request.urlopen(req, timeout=15) as r:
    ctx = json.load(r)

# Signal — only on a closed bar
if (ctx["bar"]["closed"] and ctx["data_quality"]["score"] >= 70
        and ctx["cost_risk"]["tradable"]):
    decide(ctx["bar"])
GET /v1/context/BTCUSDTexample response (static)
{
    "symbol": "BTCUSDT",
    "market": "spot",
    "interval": "1m",
    "ts": 1784179275000,
    "context_scope": "live_snapshot",
    "historical_safe": false,
    "bar": {
        "ts": 1784179200000,
        "open": "65000.00",
        "high": "65080.00",
        "low": "64950.00",
        "close": "65040.00",
        "volume": "123.45",
        "quote_volume": "8023456.78",
        "trades": 4120,
        "closed": true,
        "taker_buy_volume": "60.10",
        "indicators": {
            "ema20": "64910.12",
            "ema50": "64500.00",
            "ema200": "62000.00",
            "rsi14": "54.20",
            "atr14": "180.50",
            "vwap": "64980.00",
            "vol_sma20": "95.00",
            "adx14": "22.10",
            "plus_di14": "24.50",
            "minus_di14": "17.80",
            "di_side": "1",
            "obv": "1500000.00",
            "mfi14": "48.00",
            "cvd_delta": "-3.25",
            "ema50_slope_pct": "0.031000",
            "ema_slope_abs": "0.031000",
            "atr50": "210.00",
            "atr_ratio_14_50": "0.859524",
            "volume_usd": "8023456.78",
            "volume_rate": "8023456.78",
            "bb_mid": "64900.00",
            "bb_upper": "65200.00",
            "bb_lower": "64600.00",
            "bb_width": "0.009244",
            "body": "0.307692",
            "wick_balance": "0.153846",
            "close_pos": "0.692308",
            "candle_q": "0.261538",
            "range_ratio": "0.720222",
            "atr_pct": "0.277521",
            "last_swing_high": "65200.00",
            "last_swing_low": "64400.00"
        }
    },
    "ticker": {
        "ts": 1784179274000,
        "last": "65042.10",
        "bid": "65042.00",
        "ask": "65042.20",
        "open_24h": "64200.00",
        "high_24h": "65300.00",
        "low_24h": "63800.00",
        "volume_24h": "28000.50",
        "quote_volume_24h": "1800000000.00",
        "price_change_pct_24h": "1.25",
        "weighted_avg_24h": "64890.00"
    },
    "depth": {
        "ts": 1784179274000,
        "best_bid": "65042.00",
        "best_ask": "65042.20",
        "spread_pct": "0.000307",
        "bid_volume": "55.00",
        "ask_volume": "45.00",
        "imbalance": "0.5500",
        "bid_wall": {
            "price": "65000.00",
            "qty": "12.50",
            "distance_pct": "-0.064727"
        },
        "ask_wall": {
            "price": "65100.00",
            "qty": "8.00",
            "distance_pct": "0.089019"
        },
        "levels": 20
    },
    "bar_count": 30240,
    "ready": true,
    "history": "full_day",
    "lag_sec": 75,
    "indicators_ready": true,
    "data_quality": {
        "score": 92,
        "flags": []
    },
    "freshness": {
        "ticker": {
            "available": true,
            "fresh": true,
            "age_sec": 1,
            "max_age_sec": 30
        },
        "depth": {
            "available": true,
            "fresh": true,
            "age_sec": 1,
            "max_age_sec": 10
        },
        "macro_snapshot": {
            "available": true,
            "fresh": true,
            "age_sec": 900,
            "max_age_sec": 7200
        },
        "market_regime": {
            "available": true,
            "fresh": true,
            "age_sec": 900,
            "max_age_sec": 7200
        }
    },
    "macro_event_soon": false,
    "next_macro_event": {
        "ts": 1784246400000,
        "title": "CPI m/m",
        "country": "USD",
        "impact": "high"
    },
    "derivatives": {
        "snapshot": {
            "ts": 1784179270000,
            "mark_ts": 1784179270000,
            "mark_price": "65045.10",
            "index_price": "65040.00",
            "funding_rate": "0.000100",
            "next_funding_ts": 1784196000000,
            "open_interest": "85000.50",
            "open_interest_ts": 1784179260000
        },
        "funding_7d": {
            "samples": 21,
            "from_ts": 1783574475000,
            "to_ts": 1784160000000,
            "funding_ma_7d": "0.000080",
            "funding_std_7d": "0.000050"
        },
        "stale": false
    },
    "liquidations": {
        "windows": {
            "five_min": {
                "window_sec": 300,
                "from_ts": 1784178975000,
                "to_ts": 1784179275000,
                "count": 3,
                "total_long_qty": "1.80",
                "total_short_qty": "0.60",
                "total_long_value": "120000.00",
                "total_short_value": "40000.00"
            },
            "one_hour": {
                "window_sec": 3600,
                "from_ts": 1784175675000,
                "to_ts": 1784179275000,
                "count": 40,
                "total_long_qty": "14.00",
                "total_short_qty": "8.00",
                "total_long_value": "900000.00",
                "total_short_value": "500000.00"
            }
        }
    },
    "macro_snapshot": {
        "ts": 1784178375000,
        "fear_greed": {
            "ts": 1784073600000,
            "value": 25,
            "classification": "Extreme Fear"
        },
        "fear_greed_updated_ts": 1784178375000,
        "btc_dominance_pct": "56.27",
        "eth_dominance_pct": "12.10",
        "total_market_cap_usd": "2400000000000.00",
        "total_volume_24h_usd": "90000000000.00",
        "global_updated_ts": 1784178375000,
        "stablecoin_total_usd": "300000000000.00",
        "usdt_supply_usd": "110000000000.00",
        "usdc_supply_usd": "34000000000.00",
        "stablecoins_updated_ts": 1784178375000,
        "usd_index": "120.50",
        "usd_index_ts": 1783987200000,
        "us_10y_yield_pct": "4.62",
        "us_10y_ts": 1783987200000
    },
    "cross_exchange": {
        "symbol": "BTCUSDT",
        "ts": 1784179270000,
        "consensus_mid": "65052.765",
        "fresh_venues": 3,
        "divergence_warning": false,
        "venues": [
            {
                "id": "v1",
                "quote": {
                    "bid": "65052.76",
                    "ask": "65052.77",
                    "bid_qty": "1.20",
                    "ask_qty": "0.85",
                    "source_ts": 1784179269700,
                    "received_ts": 1784179270000
                },
                "mid": "65052.765",
                "divergence_bps": "0.0000",
                "age_ms": 0,
                "stale": false,
                "connected": true
            },
            {
                "id": "v2",
                "quote": {
                    "bid": "65051.90",
                    "ask": "65052.40",
                    "bid_qty": "0.90",
                    "ask_qty": "1.10",
                    "source_ts": 1784179269200,
                    "received_ts": 1784179269500
                },
                "mid": "65052.150",
                "divergence_bps": "0.9450",
                "age_ms": 500,
                "stale": false,
                "connected": true
            },
            {
                "id": "v3",
                "quote": {
                    "bid": "65053.10",
                    "ask": "65053.60",
                    "bid_qty": "0.70",
                    "ask_qty": "0.60",
                    "source_ts": 1784179268800,
                    "received_ts": 1784179269300
                },
                "mid": "65053.350",
                "divergence_bps": "0.8990",
                "age_ms": 700,
                "stale": false,
                "connected": true
            }
        ]
    },
    "market_regime": {
        "ts": 1784178375000,
        "interval": "1h",
        "lookback_days": 7,
        "benchmark": "BTCUSDT",
        "symbol_count": 2,
        "breadth_above_ema20_pct": 80,
        "breadth_above_ema50_pct": 60,
        "median_return_1h_pct": -0.05,
        "median_return_24h_pct": 1.2,
        "decoupling_count": 1,
        "symbols": [
            {
                "symbol": "BTCUSDT",
                "correlation_btc_7d": 1,
                "correlation_btc_24h": 1,
                "realized_volatility_24h_pct": 38.5,
                "realized_volatility_7d_pct": 42,
                "volatility_regime": "low_vol_range",
                "decoupling_detected": false,
                "return_1h_pct": -0.05,
                "return_24h_pct": 1.25,
                "above_ema20": true,
                "above_ema50": true
            },
            {
                "symbol": "ETHUSDT",
                "correlation_btc_7d": 0.85,
                "correlation_btc_24h": 0.4,
                "realized_volatility_24h_pct": 45,
                "realized_volatility_7d_pct": 48,
                "volatility_regime": "low_vol_range",
                "decoupling_detected": true,
                "return_1h_pct": -0.1,
                "return_24h_pct": 2.5,
                "above_ema20": true,
                "above_ema50": true
            }
        ]
    },
    "volatility_regime": "low_vol_range",
    "decoupling_detected": false,
    "trade_cost": {
        "source": "preset",
        "fee_buy": "0.001",
        "fee_sell": "0.001",
        "spread_bps": "2.0",
        "spread_from_depth": true,
        "slip_bps": "2.0",
        "half_spread": "0.0001",
        "c_spot": "0.0025",
        "funding_rate": "0.0001",
        "c_perp": "0.0026"
    },
    "cost_risk": {
        "atr_pct": "0.28",
        "d_sl_pct": "0.56",
        "c_r": "0.446429",
        "p_be": "0.482143",
        "tradable": true,
        "params": {
            "k_sl": "2.0",
            "rr": "2.0",
            "tradable_c_r_max": "0.45"
        }
    },
    "htf": {
        "m15": {
            "ts": 1784178300000,
            "open": "64980.00",
            "high": "65040.00",
            "low": "64920.00",
            "close": "65020.00",
            "volume": "1840.20",
            "quote_volume": "120351851.70",
            "trades": 61020,
            "closed": true,
            "taker_buy_volume": "980.00",
            "indicators": {
                "ema20": "64950.00",
                "ema50": "64500.00",
                "ema200": "62000.00",
                "rsi14": "54.20",
                "atr14": "180.50",
                "vwap": "64980.00",
                "vol_sma20": "95.00",
                "adx14": "24.10",
                "plus_di14": "24.50",
                "minus_di14": "17.80",
                "di_side": "1",
                "obv": "1500000.00",
                "mfi14": "48.00",
                "cvd_delta": "-3.25",
                "ema50_slope_pct": "0.031000",
                "ema_slope_abs": "0.031000",
                "atr50": "210.00",
                "atr_ratio_14_50": "0.859524",
                "volume_usd": "120351851.70",
                "volume_rate": "8023456.78",
                "bb_mid": "64900.00",
                "bb_upper": "65200.00",
                "bb_lower": "64600.00",
                "bb_width": "0.009244",
                "body": "0.307692",
                "wick_balance": "0.153846",
                "close_pos": "0.692308",
                "candle_q": "0.261538",
                "range_ratio": "0.720222",
                "atr_pct": "0.277521",
                "last_swing_high": "65200.00",
                "last_swing_low": "64400.00"
            }
        },
        "h1": {
            "ts": 1784174400000,
            "open": "64800.00",
            "high": "64920.00",
            "low": "64740.00",
            "close": "64880.00",
            "volume": "7420.00",
            "quote_volume": "481407406.80",
            "trades": 240000,
            "closed": true,
            "taker_buy_volume": "3900.00",
            "indicators": {
                "ema20": "64910.12",
                "ema50": "64500.00",
                "ema200": "62000.00",
                "rsi14": "54.20",
                "atr14": "180.50",
                "vwap": "64980.00",
                "vol_sma20": "95.00",
                "adx14": "25.40",
                "plus_di14": "24.50",
                "minus_di14": "17.80",
                "di_side": "1",
                "obv": "1500000.00",
                "mfi14": "48.00",
                "cvd_delta": "-3.25",
                "ema50_slope_pct": "0.031000",
                "ema_slope_abs": "0.031000",
                "atr50": "210.00",
                "atr_ratio_14_50": "0.859524",
                "volume_usd": "481407406.80",
                "volume_rate": "8023456.78",
                "bb_mid": "64900.00",
                "bb_upper": "65200.00",
                "bb_lower": "64600.00",
                "bb_width": "0.009244",
                "body": "0.307692",
                "wick_balance": "0.153846",
                "close_pos": "0.692308",
                "candle_q": "0.261538",
                "range_ratio": "0.720222",
                "atr_pct": "0.277521",
                "last_swing_high": "65200.00",
                "last_swing_low": "64400.00"
            }
        },
        "h4": {
            "ts": 1784160000000,
            "open": "64500.00",
            "high": "64700.00",
            "low": "64400.00",
            "close": "64620.00",
            "volume": "28000.00",
            "quote_volume": "1925629627.20",
            "trades": 900000,
            "closed": true,
            "taker_buy_volume": "14000.00",
            "indicators": {
                "ema20": "64410.00",
                "ema50": "64500.00",
                "ema200": "62000.00",
                "rsi14": "54.20",
                "atr14": "180.50",
                "vwap": "64980.00",
                "vol_sma20": "95.00",
                "adx14": "22.10",
                "plus_di14": "24.50",
                "minus_di14": "17.80",
                "di_side": "1",
                "obv": "1500000.00",
                "mfi14": "48.00",
                "cvd_delta": "-3.25",
                "ema50_slope_pct": "0.031000",
                "ema_slope_abs": "0.031000",
                "atr50": "210.00",
                "atr_ratio_14_50": "0.859524",
                "volume_usd": "1925629627.20",
                "volume_rate": "8023456.78",
                "bb_mid": "64900.00",
                "bb_upper": "65200.00",
                "bb_lower": "64600.00",
                "bb_width": "0.009244",
                "body": "0.307692",
                "wick_balance": "0.153846",
                "close_pos": "0.692308",
                "candle_q": "0.261538",
                "range_ratio": "0.720222",
                "atr_pct": "0.277521",
                "last_swing_high": "65200.00",
                "last_swing_low": "64400.00"
            }
        },
        "d1": {
            "ts": 1784073600000,
            "open": "63800.00",
            "high": "65300.00",
            "low": "63600.00",
            "close": "64200.00",
            "volume": "180000.00",
            "quote_volume": "11553777763.20",
            "trades": 5200000,
            "closed": true,
            "taker_buy_volume": "90000.00",
            "indicators": {
                "ema20": "64910.12",
                "ema50": "64500.00",
                "ema200": "61800.00",
                "rsi14": "54.20",
                "atr14": "180.50",
                "vwap": "64980.00",
                "vol_sma20": "95.00",
                "adx14": "22.10",
                "plus_di14": "24.50",
                "minus_di14": "17.80",
                "di_side": "1",
                "obv": "1500000.00",
                "mfi14": "48.00",
                "cvd_delta": "-3.25",
                "ema50_slope_pct": "0.031000",
                "ema_slope_abs": "0.031000",
                "atr50": "210.00",
                "atr_ratio_14_50": "0.859524",
                "volume_usd": "11553777763.20",
                "volume_rate": "8023456.78",
                "bb_mid": "64900.00",
                "bb_upper": "65200.00",
                "bb_lower": "64600.00",
                "bb_width": "0.009244",
                "body": "0.307692",
                "wick_balance": "0.153846",
                "close_pos": "0.692308",
                "candle_q": "0.261538",
                "range_ratio": "0.720222",
                "atr_pct": "0.277521",
                "last_swing_high": "65200.00",
                "last_swing_low": "64400.00"
            }
        }
    },
    "failover": false
}
Ecosystem

Data here, decisions in your code

Oracle delivers facts over the API. You write the strategy, backtest, and execution — any language, any bot or signal engine.

📡

Market Oracle

Clean market data: bars, indicators, order book, macro, and market regime.

● You are here
→
⚙️

Your bot

Any API client: trading robot, signals, screener, or AI agent.

● Your code
FAQ

Answers for bots, agents, and developers

Machine index: llms.txt. Full contract: agents.md. Below is the same facts in short form for crawlers and humans.

What is the Market Oracle API?

Market Oracle is a crypto market-data API for trading bots, signal engines, and AI agents. It does not open trades. One call to GET /v1/context/{symbol} returns a decision snapshot: closed bar with verified indicators, live book, trade_cost/cost_risk, HTF, derivatives, macro, quotes, market regime, and data_quality.

Where do REST and WebSocket requests go?

API host is https://api.market-oracle.pro (not the marketing site). WebSocket: wss://api.market-oracle.pro/v1/stream. Every /v1/* call and the socket need Authorization: Bearer mo_…. Only GET /health is public.

Can I use it from Python or Node.js without an SDK?

Yes. There is no official SDK. Docs include stdlib Python (urllib) and Node.js fetch examples. Send JSON decimal strings as-is; do not treat prices as binary floats.

Does the WebSocket stream the live order book?

The default stream is closed 1m bar_close (lean bar + indicators). Minute order-book microstructure is opt-in (microstructure:true → microstructure_close). REST GET /v1/microstructure/{symbol} and GET /v1/depth cover book facts. WebSocket does not emit 5m/15m bar_close.

When may a bot or AI agent form a trading signal?

Only on a closed bar (closed: true), once per symbol:ts. Live trigger is closed 1m; higher TFs must wait for the native closed candle (GET /v1/history?interval=… or live context.htf). Do not trade an in-progress candle and do not stitch minutes for oracle-only fields.

Which symbols are available?

Paid plans see the full fixed USDT spot set: BTCUSDT, ETHUSDT, SOLUSDT, BNBUSDT, DOGEUSDT, XRPUSDT. The Free plan is BTCUSDT only (GET /v1/me → allowed_symbols). You cannot add a ticker. Use GET /v1/symbols and take ready=true (ideally history=full_day). Macro and calendar are not pair-scoped.

How should an AI agent start integration?

Read /llms.txt, then the Markdown spec /en/docs/agents.md (or /ru/docs/agents.md). Fetch a free API key from the site, call GET /health, GET /v1/me, GET /v1/symbols, subscribe to WS /v1/stream, and take GET /v1/context/{symbol} before an entry. Enter only if cost_risk.tradable and data_quality.score ≥ 70.

Can I pay with a foreign bank card?

No. Paid plans are in RUB only. We accept Russian-issued MIR, Visa, and Mastercard (banks of the Russian Federation) and SBP. Cards of foreign banks are not accepted. The Free plan does not require a card.