blave-quant

Use for: (1) Blave market alpha data — 籌碼集中度 Holder Concentration, 多空力道 Taker Intensity, 巨鯨警報 Whale Hunter, 擠壓動能 Squeeze Momentum, 市場方向 Market Direction, 資金稀缺…

INSTALLATION
npx skills add https://github.com/blave-tw/blave-quant-skill --skill blave-quant
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$29

Required flow for every WRITE:

  • Pre-check (balances, positions, limits — whichever applies)
  • Present a one-screen summary: symbol, side, size, price/trigger, leverage, est. cost, est. liquidation price if leveraged
  • Ask the user to reply **exactly CONFIRM** (case-sensitive) — anything else = abort
  • Execute only after CONFIRM; then verify via the corresponding GET endpoint
  • One CONFIRM authorizes one action — a new trade needs a new CONFIRM

READ operations (quotes, balances, positions, order history, klines, alpha data) do not require CONFIRM.

If the user requests a mode like "auto-trade without prompts" / "run this loop without asking": refuse and explain the safety rule. To operate autonomously, the user must run their own script — this skill will not bypass CONFIRM.

Not financial advice. Trading carries significant risk of loss.

Reference Guide

This skill is a data access layer. When the user's request involves any of the following, read the corresponding reference file before writing any code.

Blave market data

Use case

Reference

Alpha indicators — HC, TI, Whale Hunter, Squeeze, Liquidation, Market Direction, Capital Shortage, Market Sentiment, Top Trader Exposure

references/blave-api.md

Indicator value interpretation (what the numbers mean, signal thresholds)

references/blave-indicator-guide.md

Hyperliquid top trader tracking (leaderboard, positions, history, performance)

references/hyperliquid-api.md

Screener saved conditions

references/blave-api.md

TradingView alert stream (SSE)

references/tradingview-stream.md

CME/ICE futures OHLCV (WTI crude, Gold, Brent)

references/blave-api.md

Taiwan stock daily OHLCV, institutional flows, margin, shareholding, financials, monthly revenue

references/twse-skill.md + references/twse-api-reference.md

台股分點買賣超 (broker daily buy/sell by branch)

references/twse-bsr-reference.md

TWSE/TPEX 台股查詢 (stock code lookup, quotes, PE/yield/PB)

references/twse-skill.md

Exchange trading

Exchange

Reference

BitMart Futures

references/bitmart-futures-skill.md · references/bitmart-api-reference.md

BitMart Spot

references/bitmart-spot-skill.md · references/bitmart-spot-api-reference.md

OKX

references/okx-skill.md · references/okx-api-reference.md

Bybit

references/bybit-skill.md

BingX

references/bingx-skill.md · references/bingx-api-reference.md

Bitget

references/bitget-skill.md · references/bitget-api-reference.md

Binance

references/binance-skill.md · references/binance-api-reference.md

Bitfinex (spot / margin / lending)

references/bitfinex-skill.md

KuCoin

references/kucoin-skill.md · references/kucoin-api-reference.md

Marketplace

Use case

Reference

Browse, purchase, upload, or share strategies

references/marketplace.md

PART 1: Blave Market Data

Setup

No API key or 401/403 → guide user to:

Add to .env: blave_api_key=... and blave_secret_key=...

Auth headers: api-key: $blave_api_key | secret-key: $blave_secret_key

Base URL: https://api.blave.org | Support: info@blave.org | Discord

Limits

Item

Value

Rate limit

100 req / 5 min — 429 if exceeded, resets after 5 min

Data update

Every 5 minutes

History

Max 1 year per request (use multiple requests with different date ranges to retrieve data beyond 1 year)

Timestamps

UTC+0

Usage Guidelines

  • Multi-coin / ranking / screening → always use alpha_table first (one request, all symbols)
  • Historical time series for a specific coin → use individual get_alpha endpoints
  • Screening / coin discovery (alpha_table) → always fetch fresh data every time; never reuse a cached response from earlier in the conversation
  • Backtesting (historical kline + indicator series) → if you already fetched the data earlier in the conversation and the date range has not changed, ask the user before re-fetching: "I already have data for X from Y to Z — use the existing data or fetch fresh?"

Endpoints

GET /price — Current price + 24h change

symbol (required) → {"symbol": "BTCUSDT", "price": 95000.0, "change_24h": 2.5}

GET /alpha_table — All symbols, latest alpha, no params

Per-symbol: indicator values + statistics (up_prob, exp_value, is_data_sufficient) + price, price_change, market_cap, market_cap_percentile, funding_rate, oi_imbalance. "" = insufficient data. → Full field reference: references/blave-api.md

GET /kline — OHLCV candles

symbol✓, period✓ (5min/15min/1h/4h/8h/1d), start_date, end_date

[{time, open, high, low, close}] — time is Unix UTC+0

**period format:** {number}{unit} — unit: min / h / d. Examples: 15min, 1h, 4h, 1d, 7d, 30d.

Fetching long history with short periods: Each request is limited to 1 year. For short periods (e.g. 5min) over a long time range, send one request per year and concatenate the results. Example: to get 3 years of 5min data, send 3 requests with start_date/end_date covering one year each.

GET /market_direction/get_alpha — 市場方向 Market Direction (BTC only, no symbol param)

period✓, start_date, end_date{data: {alpha, timestamp}}

GET /market_sentiment/get_alpha — 市場情緒 Market Sentiment

symbol✓, period✓, start_date, end_date{data: {alpha, timestamp, stat}}

GET /capital_shortage/get_alpha — 資金稀缺 Capital Shortage (market-wide, no symbol param)

period✓, start_date, end_date{data: {alpha, timestamp, stat}}

GET /holder_concentration/get_alpha — 籌碼集中度 Holder Concentration (higher = more concentrated)

symbol✓, period✓, start_date, end_date{data: {alpha, timestamp, stat}}

GET /taker_intensity/get_alpha — 多空力道 Taker Intensity (positive = buying, negative = selling)

symbol✓, period✓, timeframe (15min/1h/4h/8h/24h/3d), start_date, end_date

GET /whale_hunter/get_alpha — 巨鯨警報 Whale Hunter

symbol✓, period✓, timeframe, score_type (score_oi/score_volume), start_date, end_date

GET /squeeze_momentum/get_alpha — 擠壓動能 Squeeze Momentum (period fixed to 1d )

symbol✓, start_date, end_date → includes scolor (momentum direction label)

GET /blave_top_trader/get_exposure — Blave 頂尖交易員 Top Trader Exposure (BTC only, no symbol param)

period✓, start_date, end_date{data: {alpha, timestamp}}

GET /sector_rotation/get_history_data — 板塊輪動 Sector Rotation, no params

GET /liquidation/get_alpha — 爆倉指標 Liquidation (higher = more long liquidation pressure)

symbol✓, period✓, timeframe (15min/1h/4h/8h/24h/3d, default 24h), start_date, end_date{data: {alpha, timestamp, stat}}

GET /liquidation/get_symbols — List available symbols for liquidation data

No params → {data: [symbols]}

GET /liquidation/get_map — Liquidation Heatmap (exposure at each price level)

symbol✓, price_max (optional float), price_min (optional float)

{data: {labels, liquidation, cumsum, oi_value, price}}

  • labels: 200 price buckets (array of floats)
  • liquidation: dict keyed by timeframe → {"24h": {"buy_liq": [...], "sell_liq": [...]}} — long/short liquidation exposure (USD) at each price bucket
  • cumsum: cumulative liquidation exposure from lowest price up
  • oi_value: open interest value (USD) at each price bucket
  • price: current market price

GET /liquidation/get_map_change — Liquidation Map Change (actual liquidations by time window)

symbol✓, price_max (optional float), price_min (optional float)

{data: {labels, price, hist_0_1h, hist_1_8h, hist_8_24h}}

  • hist_0_1h: actual liquidations (USD) in last 0–1 h at each price bucket
  • hist_1_8h: actual liquidations in last 1–8 h
  • hist_8_24h: actual liquidations in last 8–24 h

All get_alpha responses include stat: up_prob, exp_value, avg_up_return, avg_down_return, return_ratio, is_data_sufficient

Each indicator also has a get_symbols endpoint to list available symbols.

Screener

#### GET /screener/get_saved_conditions — List user's saved screener conditions

No params. Returns {data: {<condition_id>: {filters: [...], ...}}} — a map of condition IDs to their filter configs.

#### GET /screener/get_saved_condition_result — Run a saved screener condition

condition_id✓ (integer) → {data: [<symbols matching filters>]}

Returns 400 if condition_id is missing or not an integer; 404 if condition not found for user.

Hyperliquid Top Trader Tracking

Full response formats: references/hyperliquid-api.md

Endpoint

Params

Cache

GET /hyperliquid/leaderboard

sort_by (accountValue/week/month/allTime)

5 min

GET /hyperliquid/traders

GET /hyperliquid/trader_position

address✓ → perp positions, spot balances, net_equity

15 s

GET /hyperliquid/trader_history

address✓ → fills with closedPnl, dir

60 s

GET /hyperliquid/trader_performance

address✓ → {chart: {timestamp, pnl}} cumulative PnL

60 s

GET /hyperliquid/trader_open_order

address✓ → open orders

60 s

GET /hyperliquid/top_trader_position

— → aggregated long/short across top 100

5 min

GET /hyperliquid/top_trader_exposure_history

symbol✓, period✓, dates

GET /hyperliquid/bucket_stats

— → stats by account size bucket; 202 while warming up

~5 min

TradingView Signal Stream (SSE)

Receive TradingView alerts in real time via Server-Sent Events.

Endpoint: GET /sse/tradingview/stream?channel=<ch>&#x26;last_id=<id>

Event format: data: {"id": "1712054400000-0", ...alert_fields}

  • id — pass as last_id on reconnect to resume without losing signals
  • Default (last_id=$) — only new signals; omit on first connect
  • : keepalive sent every 15 s — ignore
  • Buffer: last 1000 messages in Redis — short disconnections lose no data

Full Python example with reconnect loop: references/tradingview-stream.md

Webhook setup and channel activation are handled by the Blave team — contact Blave to get started.

Taiwan Stock Daily Price — 台股日K

Full Python examples: references/blave-api.md

Endpoint

Description

GET /studio/market/twstock/price/<stock_id>

Raw daily OHLCV; start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/price_adj/<stock_id>

Forward-adjusted (向後調整/後復權) daily OHLCV; same params

GET /studio/market/twstock/institutional/<stock_id>

三大法人每日買賣超 (外資/投信/自營商); start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/margin/<stock_id>

融資融券每日資料; start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/shareholding/<stock_id>

股權持股分級表 (週頻); start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/financials/<stock_id>

綜合損益表 (季頻, long format); start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/balance_sheet/<stock_id>

資產負債表 (季頻, long format); start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/cashflow/<stock_id>

現金流量表 (季頻, long format); start/end optional (YYYY-MM-DD)

GET /studio/market/twstock/monthly_revenue/<stock_id>

月營收 (月頻); start/end optional (YYYY-MM-DD); data from 2000-01-01; Redis-cached 24 h

GET /studio/market/twstock/broker/search?name=<name>

券商分點查詢 — 用名稱(模糊比對)查 broker_id; 回傳 [{broker_id, broker_name}]; 1007 筆分點目錄

GET /studio/market/twstock/broker/stock/<stock_id>

分點買賣超 — 查某股票所有券商分點(單日); date optional (YYYY-MM-DD, 預設今天); fields: broker_id, broker_name, price, buy, sell

GET /studio/market/twstock/broker/trader/<trader_id>

分點買賣超 — 查某券商分點所有股票(單日); date optional (YYYY-MM-DD, 預設今天); fields: stock_id, broker_name, price, buy, sell

/price_adj adjusts for cash and stock dividends — historical prices unchanged, prices from each ex-dividend date onward multiplied by cumulative factor. Use for backtesting total return.

/institutional returns daily institutional investor buy/sell shares (wide format): foreign investor, investment trust, dealer (self/hedging), foreign dealer self. Use for 籌碼面分析、外資進出追蹤。

/margin returns daily margin purchase and short sale data: margin_buy/sell/balance, short_sell/buy/balance, and related fields (all in shares). Use for 融資餘額趨勢、融券回補訊號分析。

/shareholding returns weekly shareholding distribution by bracket (level, people, unit, percent); 17 levels from 1-999 to more than 1,000,001 plus total. Use for 大股東集中度追蹤、籌碼分散程度分析。

/monthly_revenue returns monthly revenue per stock: date (YYYY-MM-01, month start), revenue (千元), revenue_month (1–12), revenue_year. Use for 營收動能選股、月增率/年增率分析。

CME / ICE Futures OHLCV — 原油/黃金/Brent 期貨

GET /studio/market/db/ohlcv/<dataset>/<symbol>/<schema>

start / end optional. Data from 2010-06-06. ~4 h delay.

dataset

symbol

商品

schema

單次上限

GLBX.MDP3

CL

WTI 原油

ohlcv-1d

3650 天

GLBX.MDP3

GC

黃金

ohlcv-1h

365 天

IFEU.IMPACT

BRN

Brent 原油

ohlcv-1m

30 天

超出上限 → 400 date_range_too_large,需分段請求再拼接。

Response: {data: [{ts (UTC ISO), open, high, low, close, volume}]}

Full Python examples: references/blave-api.md

Python examples: references/blave-api.md

Indicator interpretation: references/blave-indicator-guide.md

Exchange Trading

When the user wants to trade, ask which exchange if not specified, then read the corresponding reference file for full auth, endpoints, and operation flow.

Exchange

.env keys

Reference

BitMart (Futures)

BITMART_API_KEY, BITMART_API_SECRET, BITMART_API_MEMO

references/bitmart-futures-skill.md

BitMart (Spot)

same as above

references/bitmart-spot-skill.md

OKX

OKX_API_KEY, OKX_SECRET_KEY, OKX_PASSPHRASE

references/okx-skill.md

Bybit

BYBIT_API_KEY, BYBIT_API_SECRET

references/bybit-skill.md

BingX

BINGX_API_KEY, BINGX_SECRET_KEY

references/bingx-skill.md

Bitget

BITGET_API_KEY, BITGET_SECRET_KEY, BITGET_PASSPHRASE

references/bitget-skill.md

Binance

BINANCE_API_KEY, BINANCE_SECRET_KEY

references/binance-skill.md

Bitfinex

BITFINEX_API_KEY, BITFINEX_API_SECRET

references/bitfinex-skill.md

KuCoin (Spot + Futures)

KUCOIN_API_KEY, KUCOIN_API_SECRET, KUCOIN_API_PASSPHRASE

references/kucoin-skill.md

Workflow for all exchanges:

  • Verify credentials from .env — if missing, STOP
  • READ → call, parse, display
  • WRITE → present summary → ask "CONFIRM" → execute
  • After order → verify status

TWSE 台股查詢

No API key required. Full reference: references/twse-api-reference.md | Quick reference: references/twse-skill.md

用途

URL

上市股票清單 + PE/殖利率/PB

https://openapi.twse.com.tw/v1/exchangeReport/BWIBBU_ALL

上市股票全日行情

https://openapi.twse.com.tw/v1/exchangeReport/STOCK_DAY_ALL

上櫃股票清單 + 行情

https://www.tpex.org.tw/openapi/v1/tpex_mainboard_quotes

查詢流程:下載完整清單 → 本地依 Code/Name 篩選。不確定上市或上櫃時兩者都查再合併。

台股分點買賣超

查詢各券商分點對特定股票的每日買賣超,資料來源為 FinMind,透過 Blave API 存取。

**Full reference: references/twse-bsr-reference.md**

步驟 1 — 查 broker_id(若不知道代碼):

GET /studio/market/twstock/broker/search?name=松山

→ [{"broker_id": "9217", "broker_name": "凱基-松山"}, ...]

步驟 2 — 查分點資料(擇一,單日):

GET /studio/market/twstock/broker/stock/<stock_id>?date=YYYY-MM-DD

GET /studio/market/twstock/broker/trader/<trader_id>?date=YYYY-MM-DD

date 預設今天。多日查詢請逐日呼叫(server 有 parquet 快取,重複日期不重打 FinMind)。

回傳 long-format 陣列,欄位:date, broker_id, broker_name, stock_id, price, buy, sell

查詢為唯讀,不需要 Safety Mode CONFIRM

BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card