crypto-market-data
crypto-market-data
Fetch all market data for a trading pair in a single parallel run using
scripts/fetch_market_data.py. All 5 HTTP requests fire concurrently via ThreadPoolExecutor.
Quick Start
# BTC/USDT (default)
python3 scripts/fetch_market_data.py \
--base-url <BASE_URL> \
--api-key <API_KEY>
# Specific pair
python3 scripts/fetch_market_data.py ETH/USDT \
--base-url <BASE_URL> \
--api-key <API_KEY>
# Output raw JSON (useful for piping into other tools)
python3 scripts/fetch_market_data.py BTC/USDT --json \
--base-url <BASE_URL> \
--api-key <API_KEY>
Set env vars to avoid repeating flags:
export AITRADE_BASE_URL=https://agent-toolkit.01010101.xyz
export AITRADE_API_KEY=<token>
python3 scripts/fetch_market_data.py ETH/USDT
Dependency: pip install requests
What the Script Fetches (all in parallel)
| # | Data | Endpoint |
|---|---|---|
| 1 | Funding rate + mark price | GET /api/market/sentiment?symbol=<SYMBOL> |
| 2 | Long/short ratio (1H) | same aggregated response |
| 3 | Fear & greed index | same aggregated response |
| 4 | 15m K-line screenshot | POST /api/analysis/screenshot-tasks/capture |
| 5 | 1H K-line (RSI + SMC) | same endpoint |
| 6 | 4H K-line (MACD + vol) | same endpoint |
| 7 | 1D K-line (EMA + vol) | same endpoint |
Screenshot Indicator Configuration
| Timeframe | Indicators | Purpose |
|---|---|---|
| 15m | vol | Entry precision, volume confirmation |
| 1H | RSI(6/12/24) + SMC | Short-term overbought/oversold + market structure |
| 4H | MACD(14/28/10) + vol | Mid-term momentum divergence |
| 1D | EMA(20/50/200) + vol | Trend direction |
Output
Formatted (default):
=== Market Data: ETH/USDT ===
### Funding Rate
Mark Price : 1953.33 USDT
Funding Rate : -0.0111% (short pays long)
### Long/Short Ratio (1H global accounts)
Long : 67.88%
Short : 32.12%
Ratio : 2.1133
### Fear & Greed Index
Value : 13 (Extreme Fear)
### K-Line Screenshots
[15m] https://rustfs.../kline_ETH_USDT_15m_....png
[ 1h] https://rustfs.../kline_ETH_USDT_1h_....png
[ 4h] https://rustfs.../kline_ETH_USDT_4h_....png
[ 1d] https://rustfs.../kline_ETH_USDT_1d_....png
JSON (--json): Dict keyed by sentiment, screenshot_15m, screenshot_1h,
screenshot_4h, screenshot_1d.
Notes
- The
symbolfor the sentiment endpoint strips/and uppercases (ETH/USDT→ETHUSDT). - Screenshot
ai_resultisnullby default — the script omitswith_aito keep latency low. - Per-request errors are reported individually without blocking other results.
More from escapewu/skills
project-analysis
深度项目分析工具。用于在现有 docs 不足、代码链路复杂、需要梳理系统架构、模块数据流、时序或性能风险时进行只读取证和结构化分析。常与 `project-docs-workflow` 配套使用,作为其升级步骤;也可在用户明确要求架构分析、数据流分析、时序图、调用链梳理或性能排查时直接使用。默认应落文档:优先新建或更新 `docs/` 下合适文档,不再停留在仅终端输出的 analysis-only 模式。
19canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
1webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
1mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
1internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
1frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
1