
Funding, OI & Basis Anomaly Report
Read-only data analysis. This skill does not place trades, connect to any exchange account, or handle wallets or keys.
This Agent does not constitute professional financial advice. Users should consult a licensed financial advisor before making financial decisions. Crypto derivatives are volatile and leveraged, and trading them carries the possibility of total loss of principal.
What it does
This skill lets your AI agent run a repeatable market-structure check on Binance USDⓈ-M (USDT-margined) perpetual futures. It downloads Binance's public futures market data, calculates every indicator in Python code, applies fixed, editable rules, and writes a Markdown report. Your agent then explains the report in plain language without changing any number.
It answers one question: "What is unusual right now, compared with its own recent history, and how reliable is the data behind it?"
It is not a daily market summary and not a trading signal service.
Indicators
| Indicator | What is measured | Default rule |
|---|---|---|
| Funding rate percentile | Binance's predicted funding rate vs settled rates over the last 90 days, at the symbol's own funding interval (1h, 4h or 8h) | At or above the 95th or at or below the 5th percentile |
| OI vs price divergence | 24h change in open interest (contract quantity) vs 24h price change over the same window | OI changed by ≥10% in the opposite direction to a price move of ≥1%, and the size of the OI change is in the top 10% of its own 24h changes |
| Basis deviation | Perpetual price vs index price, hourly | Latest value ≥3 standard deviations from its ~20-day hourly mean |
| Long/short ratio change (all accounts) | Binance's account-count long/short ratio | 24h change ≥15% and in the top 5% of its own 24h changes |
| Long/short ratio change (top-trader positions) | Binance's top-trader long/short ratio by position size | Same rule |
All thresholds live in one JSON file that you can edit.
What makes it different
- Every number comes from code, not from the language model. The agent is instructed to quote the report exactly.
- Each anomaly shows its evidence: current value, comparison baseline (period and sample size), percentile or change, and data-quality grade.
- Data quality is reported, not hidden: duplicate timestamps removed, missing intervals counted, isolated spikes flagged, stale series excluded. If there is not enough data (for example a newly listed contract), the indicator says Cannot assess instead of guessing.
- Units and time are normalized: UTC timestamps, open interest in contracts (with USD shown alongside), funding annualized at the symbol's real settlement interval, with the method stated.
- Strict wording rules: the report and the agent's instructions exclude trade calls, price targets and promotional language. A bundled checker scans the report for forbidden wording.
Sample input
"Run the Binance futures anomaly report for the top 20 contracts."
"Check BTCUSDT, ETHUSDT and SOLUSDT for anything unusual in funding, OI or basis, and give me a CSV."
Sample output (excerpt from a real run, Binance data as of 2026-11-08 17:00 UTC)
Excerpt from the full report:
- UAIUSDT: Open interest rose 75.9% in 24h (contract quantity) while price fell 45.2% over the same window; the size of the OI change is in the 99th percentile of the 476 rolling 24h changes in the sample.
- JCTUSDT: Predicted funding rate +0.1918% per 4h is in the 99th percentile of the 540 settled rates observed over the last 90 days. Annualized at 6 settlements per day, without compounding, this is +419.95%.
- ONEUSDT: Basis (perpetual price relative to index) is -0.4817%, -4.41 standard deviations from its 499-point hourly mean of -0.1407%; it is in the 1st percentile of the 499 earlier hourly points.
These readings can change within hours. A value outside the rule describes what was observed in this sample only; it does not indicate that any particular price move is more or less likely.
Output format
- A Markdown report saved to
output/binance-futures-anomaly-report-<UTC timestamp>.md, in five sections: Summary (anomaly count) → Anomalies table with an uncertainty note → Indicator details (every symbol, every indicator) → Data quality → Method and limitations, followed by a fixed disclaimer. - Optional CSV with one row per symbol and indicator (
--csv). - A plain-language summary from your agent in the chat.
Use cases
- A daily or on-demand check of which large Binance perpetuals show unusual funding, open interest or basis behavior.
- Research and journaling: keep a dated, reproducible record of market-structure conditions with the method attached.
- Learning how funding, open interest, basis and long/short ratios relate to each other.
Supported agent clients
Built on the standard SKILL.md format. Tested end to end in Claude Code. It should also work in other SKILL.md-compatible agents that can run Python (Codex CLI, OpenClaw, Hermes), but these have not been tested yet.
Requirements
- Python 3.8 or newer (standard library only; nothing to install).
- Internet access to
fapi.binance.com. - No Binance account, no API key.
Installation
- Download and unzip the package.
- Copy the
binance-futures-anomaly-reportfolder into your agent's skills folder:- Claude Code:
~/.claude/skills/ - Codex CLI:
~/.codex/skills/ - OpenClaw:
~/.openclaw/skills/ - Hermes and other agents: their skills folder
- Claude Code:
- Ask your agent: "Run the Binance futures anomaly report."
Where it does not work
Binance does not serve futures market data to restricted jurisdictions, including the United States, and may block other locations or some cloud/datacenter networks. From a blocked location the script stops with a clear message (for example "HTTP 451: service unavailable from a restricted location") and does not produce a report. If you will run it from such a location, this skill will not work for you. Using a VPN to get around Binance's restrictions is prohibited by Binance's Terms, and this skill does not support it.
Limitations
- Binance USDⓈ-M USDT perpetuals only. It does not cover other exchanges, spot markets, coin-margined or dated futures, so it does not describe the whole crypto market.
- Binance provides open interest, basis and long/short statistics for roughly the last 30 days only; the skill uses the latest 500 hourly bars (~20 days). Funding history uses up to 90 days.
- Rules are fixed thresholds over recent history. They describe what was observed; they do not forecast anything.
- Results depend on when you run it. Binance may revise or change its public endpoints; if an endpoint changes, an indicator may show Cannot assess until the skill is updated.
- Newly listed and thinly traded contracts have short or noisy history; the report marks them.
- A run of 20 symbols makes about 100 requests and takes about 30 seconds. Running
--top 100takes a few minutes.
FAQ
Does it place trades or need my API key? No. It only reads public market data. It never asks for keys or account access.
Does it tell me what to trade? No. It reports observed values against their own history. It does not give trade recommendations, price levels or forecasts.
Can I change the thresholds? Yes. Edit config/thresholds.json.
Is my data sent anywhere? The script sends only symbol names and time parameters to Binance's public API. Nothing is sent to the publisher.
Is this affiliated with Binance? No. It is an independent tool that reads Binance's public API.
Disclaimer
Educational and informational data analysis only. This is not investment advice. This Agent does not constitute professional financial advice. Users should consult a licensed financial advisor before making financial decisions. Crypto derivatives are volatile and leveraged, and trading them carries the possibility of total loss of principal. All figures come from Binance USDⓈ-M Futures public market data only. Not affiliated with or endorsed by Binance. "Binance" is a trademark of its owner and is used only to identify the data source.
API externes
fapi.binance.com


