aicoin-market

Original🇺🇸 English
Not Translated
7 scripts

This skill should be used when the user asks about crypto prices, market data, K-line charts, funding rates, open interest, long/short ratios, whale orders, liquidation data, crypto news, newsflash, Twitter crypto tweets, trending coins, stock quotes, treasury holdings, or any crypto market query. Use when user says: 'BTC price', 'check price', 'show K-line', 'funding rate', 'open interest', 'whale orders', 'long/short ratio', 'crypto news', 'newsflash', 'trending coins', '查行情', '看价格', '大饼多少钱', 'K线', '资金费率', '多空比', '鲸鱼单', '新闻快讯', '热门币', 'liquidation map'. Covers 200+ exchanges with real-time data. MUST run node scripts to fetch real data. NEVER generate fake prices or hallucinate market data. For exchange trading (buy/sell/balance), use aicoin-trading instead. For Freqtrade strategies/backtest, use aicoin-freqtrade. For Hyperliquid whale analytics, use aicoin-hyperliquid.

2installs
Added on

NPX Install

npx skill4agent add aicoincom/aicoin-skills aicoin-market

SKILL.md Content

CoinOS Market

Crypto market data toolkit powered by AiCoin Open API. Prices, K-lines, news, signals, whale orders, and more from 200+ exchanges.
Version: 1.0.0

Critical Rules

  1. NEVER fabricate data. Always run scripts to fetch real-time data.
  2. NEVER use curl, web_fetch, or browser for crypto data. Always use these scripts.
  3. NEVER run
    env
    or
    printenv
    — leaks API secrets into logs.
  4. Scripts auto-load
    .env
    — never pass credentials inline.
  5. Reply in the user's language. Chinese input = all-Chinese response (titles, headings, analysis).
  6. On 304/403 error — STOP, do NOT retry. This is a paid feature. Follow the Paid Feature Guide to help the user upgrade.

Quick Reference

TaskCommandMin Tier
BTC price
node scripts/coin.mjs coin_ticker '{"coin_list":"bitcoin"}'
Free
K-line
node scripts/market.mjs kline '{"symbol":"btcusdt:okex","period":"3600","size":"100"}'
Free
Funding rate
node scripts/coin.mjs funding_rate '{"symbol":"BTC"}'
Basic
Long/short ratio
node scripts/features.mjs ls_ratio
Basic
Whale orders
node scripts/features.mjs big_orders '{"symbol":"btcswapusdt:binance"}'
Standard
News flash
node scripts/news.mjs flash_list '{"language":"cn"}'
Basic
Trending coins
node scripts/market.mjs hot_coins '{"key":"defi"}'
Free
Open interest
node scripts/coin.mjs open_interest '{"symbol":"BTC","interval":"15m"}'
Professional
Liquidation map
node scripts/coin.mjs liquidation_map '{"dbkey":"btcswapusdt:binance","cycle":"24h"}'
Advanced
Symbol shortcuts:
BTC
,
ETH
,
SOL
,
DOGE
,
XRP
auto-resolve in coin.mjs.
Chinese Slang: 大饼=BTC, 姨太=ETH, 狗狗=DOGE, 瑞波=XRP, 索拉纳=SOL.

Free vs Paid Endpoints

Free (built-in key, no config needed):
coin_ticker
,
kline
,
hot_coins
,
exchanges
,
pair_ticker
,
news_rss
— only 6 endpoints.
Basic ($29/mo) adds:
coin_list
,
coin_config
,
funding_rate
,
trade_data
,
ticker
,
futures_interest
,
ls_ratio
,
nav
,
pair_by_market
,
pair_list
,
news_list
,
flash_list
,
twitter/latest
,
twitter/search
,
newsflash/search
,
newsflash/list
Standard ($79/mo) adds:
big_orders
,
agg_trades
,
grayscale_trust
,
gray_scale
,
signal_alert
,
signal_config
,
strategy_signal
,
change_signal
,
depth_latest
,
newsflash
,
news_detail
,
twitter/members
,
twitter/interaction_stats
,
newsflash/detail
Advanced ($299/mo) adds:
liquidation_map
,
liquidation_history
,
liquidation
,
indicator_kline
,
indicator_pairs
,
index_list
,
index_price
,
index_info
,
depth_full
,
depth_grouped
Professional ($699/mo) adds:
ai_analysis
,
open_interest
,
estimated_liquidation
,
historical_depth
,
super_depth
,
funding_rate
(weighted),
stock_quotes
,
stock_top_gainer
,
stock_company
,
treasury_*
,
stock_market
,
signal_alert_list
,
exchange_listing
Full tier table:
docs/api-tiers.md

Setup

Scripts work out of the box with a built-in free key (6 endpoints). For more endpoints, add your API key to
.env
:
AICOIN_ACCESS_KEY_ID=your-key
AICOIN_ACCESS_SECRET=your-secret
.env
is auto-loaded from: cwd →
~/.openclaw/workspace/.env
~/.openclaw/.env

Scripts

All scripts:
node scripts/<name>.mjs <action> [json-params]

scripts/coin.mjs — Coin Data

ActionDescriptionMin TierParams
coin_ticker
Real-time pricesFree
{"coin_list":"bitcoin,ethereum"}
coin_list
List all coinsBasicNone
coin_config
Coin profileBasic
{"coin_list":"bitcoin"}
funding_rate
Funding rateBasic
{"symbol":"BTC","interval":"8h"}
Weighted: add
"weighted":"true"
(Pro)
trade_data
Trade dataBasic
{"dbkey":"btcswapusdt:okcoinfutures"}
ai_analysis
AI analysis & predictionPro
{"coin_keys":"[\"bitcoin\"]","language":"CN"}
open_interest
Open interestPro
{"symbol":"BTC","interval":"15m"}
Coin-margined: add
"margin_type":"coin"
liquidation_map
Liquidation heatmapAdv
{"dbkey":"btcswapusdt:binance","cycle":"24h"}
liquidation_history
Liquidation historyAdv
{"symbol":"btcswapusdt:binance","interval":"1m"}
estimated_liquidation
Estimated liquidationPro
{"dbkey":"btcswapusdt:binance","cycle":"24h"}
historical_depth
Historical depthPro
{"key":"btcswapusdt:okcoinfutures"}
super_depth
Large order depth >$10kPro
{"key":"btcswapusdt:okcoinfutures"}

scripts/market.mjs — Market Data

ActionDescriptionMin TierParams
kline
Standard K-lineFree
{"symbol":"btcusdt:okex","period":"3600","size":"100"}
period: 900/3600/14400/86400
hot_coins
Trending coinsFree
{"key":"defi"}
key: gamefi/anonymous/market/web/newcoin/stable/defi
exchanges
Exchange listFreeNone
ticker
Exchange tickersBasic
{"market_list":"okex,binance"}
futures_interest
Futures OI rankingBasic
{"lan":"cn"}
depth_latest
Real-time depthStd
{"dbKey":"btcswapusdt:binance"}
indicator_kline
Indicator K-lineAdv
{"symbol":"btcswapusdt:binance","indicator_key":"fundflow","period":"3600"}
indicator_pairs
Indicator pairsAdv
{"indicator_key":"fundflow"}
index_list
Index listAdvNone
index_price
Index priceAdv
{"key":"i:diniw:ice"}
index_info
Index detailsAdv
{"key":"i:diniw:ice"}
depth_full
Full order bookAdv
{"dbKey":"btcswapusdt:binance"}
depth_grouped
Grouped depthAdv
{"dbKey":"btcswapusdt:binance","groupSize":"100"}
stock_quotes
Stock quotesPro
{"tickers":"i:mstr:nasdaq"}
stock_top_gainer
Top gainersPro
{"us_stock":"true"}
stock_company
Company detailsPro
{"symbol":"i:mstr:nasdaq"}
treasury_entities
Holding entitiesPro
{"coin":"BTC"}
treasury_history
Transaction historyPro
{"coin":"BTC"}
treasury_accumulated
Accumulated holdingsPro
{"coin":"BTC"}
treasury_latest_entities
Latest entitiesPro
{"coin":"BTC"}
treasury_latest_history
Latest historyPro
{"coin":"BTC"}
treasury_summary
Holdings overviewPro
{"coin":"BTC"}

scripts/features.mjs — Features & Signals

ActionDescriptionMin TierParams
pair_ticker
Pair tickerFree
{"key_list":"btcusdt:okex,btcusdt:huobipro"}
ls_ratio
Long/short ratioBasicNone
nav
Market navigationBasic
{"lan":"cn"}
pair_by_market
Pairs by exchangeBasic
{"market":"binance"}
pair_list
Pair listBasic
{"market":"binance","currency":"USDT"}
grayscale_trust
Grayscale trustStdNone
gray_scale
Grayscale holdingsStd
{"coins":"btc,eth"}
signal_alert
Signal alertsStdNone
signal_config
Alert configStd
{"lan":"cn"}
strategy_signal
Strategy signalStd
{"signal_key":"depth_win_one"}
change_signal
Anomaly signalStd
{"type":"1"}
big_orders
Whale ordersStd
{"symbol":"btcswapusdt:binance"}
agg_trades
Aggregated large tradesStd
{"symbol":"btcswapusdt:binance"}
liquidation
Liquidation dataAdv
{"type":"1","coinKey":"bitcoin"}
signal_alert_list
Alert listProNone
stock_market
Crypto stocksProNone
delete_signal
Delete alertPro
{"id":"xxx"}

scripts/news.mjs — News & Content

ActionDescriptionMin TierParams
news_rss
RSS news feedFree
{"page":"1"}
news_list
News listBasic
{"page":"1","pageSize":"20"}
flash_list
Industry flash newsBasic
{"language":"cn"}
newsflash
AiCoin flash newsStd
{"language":"cn"}
news_detail
News detailStd
{"id":"xxx"}
exchange_listing
Exchange listing announcementsPro
{"memberIds":"477,1509"}

scripts/twitter.mjs — Twitter/X Crypto Tweets

ActionDescriptionMin TierParams
latest
Latest crypto tweetsBasic
{"language":"cn","page_size":"20"}
search
Search tweetsBasic
{"keyword":"bitcoin","language":"cn","page_size":"20"}
members
Search KOL/usersStd
{"word":"elon","page":"1","size":"20"}
interaction_stats
Tweet engagement statsStd
{"flash_ids":"123,456,789"}

scripts/newsflash.mjs — Newsflash (OpenData)

ActionDescriptionMin TierParams
search
Search newsflashBasic
{"word":"bitcoin","page":"1","size":"20"}
list
Newsflash list with filtersBasic
{"pagesize":"20","lan":"cn"}
detail
Newsflash full contentStd
{"flash_id":"123456"}

Cross-Skill References

NeedUse
Exchange trading (buy/sell/balance)aicoin-trading
Freqtrade strategies/backtest/deployaicoin-freqtrade
Hyperliquid whale trackingaicoin-hyperliquid

Common Errors

  • errorCode 304 / HTTP 403
    — Paid feature. Follow Paid Feature Guide below.
  • Invalid symbol
    — Check format: AiCoin uses
    btcusdt:okex
    , not
    BTC/USDT
  • Rate limit exceeded
    — Wait 1-2s between requests; use batch queries

Paid Feature Guide

When a script returns 304 or 403, this endpoint requires a higher API tier. Do NOT retry the same call.
Tell the user (in their language):
  1. What happened: This feature needs a paid AiCoin API subscription.
  2. How to get a key: Visit https://www.aicoin.com/opendata to register and create an API key.
  3. Tier options:
TierPriceHighlights
Free$0Prices, K-lines, trending coins (6 endpoints)
Basic$29/mo+ Funding rate, L/S ratio, news, twitter (24 endpoints)
Standard$79/mo+ Whale orders, signals, grayscale (38 endpoints)
Advanced$299/mo+ Liquidation map, indicator K-lines, index, depth (49 endpoints)
Professional$699/moAll 63 endpoints: AI analysis, OI, stocks, treasury
  1. How to configure: After getting a key, add to
    .env
    file:
AICOIN_ACCESS_KEY_ID=your-key-id
AICOIN_ACCESS_SECRET=your-secret
Scripts auto-load
.env
from cwd,
~/.openclaw/workspace/.env
, or
~/.openclaw/.env
.
  1. After configuring: The same script command will work. No code changes needed.