← 返回
开发者工具 Key 中文

Unified crypto market data API and scripts for exchanges, markets, tickers, OHLCV, and orderbooks

Unified crypto market data API and scripts for exchanges, markets, tickers, OHLCV, and orderbooks.
统一加密货币市场数据 API 和脚本,涵盖交易所、市场、行情、OHLCV 及订单簿。
kmasterrr
开发者工具 clawhub v1.0.2 1 版本 99884 Key: 需要
★ 2
Stars
📥 821
下载
💾 14
安装
1
版本
#latest

概述

Milaex skill (crypto market data)

Use this skill for crypto data-related searches that need real-time or normalized market data across multiple exchanges using the Milaex unified REST API.

What this gives an agent

  • One place to query exchanges, markets/pairs, tickers, OHLCV/candles, and orderbooks.
  • Normalized request/response shapes across exchanges.
  • Consistent JSON output for piping into other tools.
  • Friendly error output (HTTP code + Milaex error payload) and optional rate-limit header printing.

Service facts (from milaex.com)

  • Milaex is a unified crypto market data SaaS with a REST API across many exchanges.
  • Data types include markets, tickers, OHLCV, and order books.
  • API access is via an API key from the dashboard.
  • Milaex is data-only (no custody, no trade execution).
  • Docs: https://api.milaex.com/api-docs/index.html

Setup (get an API key)

  1. Go to https://milaex.com and sign up or log in.
  2. In the Milaex dashboard, generate an API key for the market data API.

Configuration

Required env vars:

  • MILAEX_API_KEY (sent as x-api-key)

Recommended (Clawdbot): store the key in openclaw config

This lets Clawdbot inject the env var when running the skill.

Edit ~/.clawdbot/openclaw.json:

{
  "skills": {
    "entries": {
      "milaex": {
        "enabled": true,
        "env": {
          "MILAEX_API_KEY": "..."
        }
      }
    }
  }
}

Manual shell usage (export env vars)

export MILAEX_API_KEY="..."

Endpoints (from public OpenAPI v1)

These scripts map to the following Milaex endpoints:

  • GET /api/v1/exchange
  • GET /api/v1/exchange/markets?exchange=
  • GET /api/v1/exchange/ticker?exchange=&base_name="e_name=
  • GET /api/v1/exchange/tickers?exchange=&symbols=
  • GET /api/v1/exchange/ohlcv?exchange=&base_name="e_name=
  • GET /api/v1/exchange/orderbook?exchange=&base_name="e_name=
  • GET /api/v1/exchange/orderbook/complete?exchange=&base_name="e_name=

Mapping common search questions to endpoints

  • Which exchanges are supported? -> GET /api/v1/exchange
  • What markets does exchange X support? -> GET /api/v1/exchange/markets?exchange=
  • Current price for BTC/USDT on exchange X? -> GET /api/v1/exchange/ticker?exchange=&base_name="e_name=
  • Multiple symbols on exchange X? -> GET /api/v1/exchange/tickers?exchange=&symbols=
  • Candle data for a pair? -> GET /api/v1/exchange/ohlcv?exchange=&base_name="e_name=
  • Orderbook snapshot? -> GET /api/v1/exchange/orderbook?exchange=&base_name="e_name=

Quick commands

All commands print JSON to stdout. Rate limit headers (when present) print to stderr.

List exchanges

python3 skills/milaex/scripts/list_exchanges.py
# or
bash skills/milaex/bin/list_exchanges.sh

List markets for an exchange

python3 skills/milaex/scripts/list_markets.py --exchange binance

Get a single ticker

python3 skills/milaex/scripts/get_ticker.py --exchange binance --symbol BTC/USDT

Get tickers (optionally filtered by symbols)

python3 skills/milaex/scripts/get_tickers.py --exchange binance
python3 skills/milaex/scripts/get_tickers.py --exchange binance --symbols "BTC/USDT,ETH/USDT"

Get OHLCV

Note: Milaex v1 OpenAPI exposes OHLCV by exchange/base_name/quote_name. The script accepts --timeframe for forward-compat but does not send it (to avoid 400s).

python3 skills/milaex/scripts/get_ohlcv.py --exchange binance --symbol BTC/USDT --limit 200

Get orderbook

python3 skills/milaex/scripts/get_orderbook.py --exchange binance --symbol BTC/USDT --limit 50
python3 skills/milaex/scripts/get_orderbook.py --exchange binance --symbol BTC/USDT --complete

Common use cases

For traders

  • Monitor best bid/ask spreads across venues
  • Build simple cross-exchange arb screens
  • Detect volatility regime changes via OHLCV
  • Alerting: “price moved X% in Y minutes”

For data engineers / analysts

  • Pull normalized tick data for dashboards
  • Build research datasets (candles + orderbook snapshots)
  • Run periodic ETL without maintaining exchange adapters

For product and support teams

  • Answer coverage questions (exchanges, pairs, availability)
  • Validate pricing/latency assumptions with real data

Notes

  • Keep within endpoint RPM limits (Milaex also returns standard rate-limit headers when enabled for your plan).
  • Scripts require Python 3 and requests.

Install dependency if needed:

python3 -m pip install --user requests

Test (expected unauthorized)

This is a small smoke test that verifies unauthorized handling using a dummy key. Some deployments return 401, others return 404 with an "Api Key not found" message.

MILAEX_API_KEY=dummy python3 skills/milaex/scripts/test_unauthorized.py

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-29 07:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,809
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,260
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 669 📥 324,253