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.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
2 · 509 · 0 current installs · 0 all-time installs
bymilatech@kmasterrr
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, required binary (python3), required env var (MILAEX_API_KEY), and the included scripts all align with a market-data client for the Milaex API. The code only implements endpoints described in the SKILL.md (exchanges, markets, tickers, OHLCV, orderbooks).
Instruction Scope
SKILL.md instructs running the included scripts and storing MILAEX_API_KEY in the agent config or env. The client code also supports an optional MILAEX_BASE_URL environment variable (used to override the API base URL) which is not listed in the 'Required env vars' section; this is harmless by itself but worth noting because it changes where requests (and the API key) are sent.
Install Mechanism
There is no install spec that downloads/extracts arbitrary code. This is an instruction + code bundle; the only dependency is the well-known 'requests' Python package and the SKILL.md documents installing it via pip --user. No untrusted URLs or archive extraction are present.
Credentials
Only MILAEX_API_KEY is required, which matches the skill's purpose. The optional MILAEX_BASE_URL env var (present in the client code, not required) can redirect requests to a non-Milaex host if set — in that situation the API key would be sent to the configured host. The number and sensitivity of env vars requested are otherwise proportionate.
Persistence & Privilege
always:false and the skill does not request elevated privileges. The SKILL.md recommends storing the API key in the OpenClaw/Clawdbot config (~/.clawdbot/openclaw.json) so the agent can inject the env var; that persists the secret in agent config and is an expected convenience but something users should consciously accept.
Assessment
This package appears to be a straightforward Milaex market-data client. Before installing: (1) Verify you trust the source/homepage (https://api.milaex.com) and that you intended to use Milaex; (2) Only supply a real MILAEX_API_KEY if you trust the code and host — the key will be sent in the x-api-key header to the configured base URL; (3) Be aware of two persistence items: the SKILL.md suggests storing the key in ~/.clawdbot/openclaw.json (this will persist the secret in your agent config), and the client honors an optional MILAEX_BASE_URL env var — do not set this to an untrusted host (it would cause your API key to be sent there); (4) The only runtime dependency is the 'requests' Python package (pip install --user requests); (5) If you want extra caution, inspect the included scripts (they are small and readable) or run the provided test_unauthorized.py with a dummy key to verify behavior before supplying your real key.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.2
Download zip
latestvk97b9fpb1gq3avz45g7j0zsxjh817xaa

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

📈 Clawdis
Binspython3
EnvMILAEX_API_KEY

SKILL.md

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=&quote_name=
  • GET /api/v1/exchange/tickers?exchange=&symbols=
  • GET /api/v1/exchange/ohlcv?exchange=&base_name=&quote_name=
  • GET /api/v1/exchange/orderbook?exchange=&base_name=&quote_name=
  • GET /api/v1/exchange/orderbook/complete?exchange=&base_name=&quote_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=&quote_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=&quote_name=
  • Orderbook snapshot? -> GET /api/v1/exchange/orderbook?exchange=&base_name=&quote_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

Files

15 total
Select a file
Select a file to preview.

Comments

Loading comments…