npx skills add https://github.com/connectcoinw/coinw-skills --skill 'Coinw Spot Skill'Coinw 现货 REST API 技能:涵盖市场数据、下单/撤单、订单查询、账户余额和资产划转。
| 编号 | 名称 | 端点 | 描述 | 方法 | 认证 | 输入参数 | 输出参数 |
|---|---|---|---|---|---|---|---|
| 1.1 | 获取交易对信息 | /api/v1/public?command=returnSymbol | 返回所有现货交易对的详细信息,包括最小/最大订单价格、数量限制和精度。 | GET | 公开 | — | currencyPair, currencyBase, currencyQuote, maxBuyCount, minBuyCount, pricePrecision, countPrecision, minBuyAmount, maxBuyAmount,共 12 个字段 |
| 1.2 | 获取所有交易对 24 小时行情汇总 | /api/v1/public?command=returnTicker | 返回所有可用交易对的 24 小时汇总指标,包括最新价格、最佳买/卖价和交易量。 | GET | 公开 | — | id, last, lowestAsk, highestBid, percentChange, isFrozen, high24hr, low24hr, baseVolume |
| 编号 | 名称 | 端点 | 描述 | 方法 | 认证 | 输入参数 | 输出参数 |
|---|---|---|---|---|---|---|---|
| 2.1 | 下单 | /api/v1/private?command=doTrade | 通过指定订单类型、数量、价格和外部订单 ID 来下现货订单。 | POST | 私有 | api_key, sign, symbol, type, amount, rate, isMarket, out_trade_no | orderNumber |
| 2.2 | 撤单 | /api/v1/private?command=cancelOrder | 根据订单 ID 撤销未成交的现货订单。 | POST | 私有 | api_key, sign, orderNumber | clientOrderId |
| 2.3 |
| 编号 | 名称 | 端点 | 描述 | 方法 | 认证 | 输入参数 | 输出参数 |
|---|---|---|---|---|---|---|---|
| 3.1 | 获取未成交订单 | /api/v1/private?command=returnOpenOrders | 返回指定交易对的所有当前未成交订单,包括订单 ID、时间、数量和状态。 | POST | 私有 | api_key, sign, currencyPair, startAt, endAt | orderNumber, date, startingAmount, total, type, prize, success_count, success_amount, status |
| 3.2 | 获取历史订单 | /api/v1/private?command=getUserTrades | 检索跨交易对的历史订单,可选择按交易对筛选。每次请求最多 100 条记录。 | POST | 私有 | api_key, sign, symbol | tradeId, orderId, price, size, side, orderType, time, fee, before,共 10 个字段 |
| 编号 | 名称 | 端点 | 描述 | 方法 | 认证 | 输入参数 | 输出参数 |
|---|---|---|---|---|---|---|---|
| 4.1 | 获取现货账户余额 | /api/v1/private?command=returnBalances | 检索用户现货账户中所有支持资产的可用余额。 | POST | 私有 | api_key, sign | data, msg |
| 4.2 | 获取完整现货余额 | /api/v1/private?command=returnCompleteBalances | 检索完整的现货余额详情,包括可用余额和订单冻结余额。 | POST | 私有 | api_key, sign | data, available, onOrders |
| 4.7 | 资产划转 |
https://api.coinw.com。GET/POST https://api.coinw.com/api/v1/public?command=...。POST https://api.coinw.com/api/v1/private?command=...,在查询/请求体中包含 api_key 和 sign(MD5,见参考)。/v1/private?command=... 和 /api/v1/private;请遵循实际实现。command 值(本文件涵盖的私有/公开端点)cancelAllOrder, cancelOrder, doTrade, getBatchHistoryOrders, getUserTrades, return24hVolume, returnBalances, returnChartData, returnCompleteBalances, returnOpenOrders, returnOrderBook, returnOrderStatus, , , , , ,
BTC_USDT(字段名因端点而异)。code, msg / message, success, failed, data(实际响应因端点而异)。LIMIT, MARKET, HL_LIMIT, PLANNING, STOP_LIMIT_ORDER, SMART_MARKET_ORDER, ICEBERG 等。curl "https://api.coinw.com/api/v1/public?command=returnSymbol"
params="api_key=$COINW_API_KEY&amount=0.001&funds=1&isMarket=1&out_trade_no=1&rate=40000&symbol=BTC_USDT"
sign_string="$params&secret_key=$COINW_SECRET_KEY"
sign=$(echo -n "$sign_string" | openssl md5 | cut -d' ' -f2 | tr '[:lower:]' '[:upper:]')
curl -X POST "https://api.coinw.com/api/v1/private?command=doTrade&$params&sign=$sign"
api_key 或 secret_key;如果显示,请隐藏中间部分,仅保留最后四个字符。api_key 和 secret_key 存储在安全的位置。当用户提供新凭据时:
TOOLS.md 中,并显示隐藏后的确认信息./references/Authentication.md./references/errorcode.md./references/notes.md./references/api-key-creation-steps.md每周安装次数
–
代码仓库
首次出现
–
安全审计
Coinw Spot REST API skill: covers market data, order placement/cancellation, order queries, account balances, and asset transfers.
| No. | name | Endpoint | Description | Method | Authentication | Input Parameters | Output Parameters |
|---|---|---|---|---|---|---|---|
| 1.1 | Get trading pair information | /api/v1/public?command=returnSymbol | Returns detailed information for all spot pairs, including min/max order price, quantity limits, and precision. | GET | Public | — |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 1.4 | 获取订单簿 | /api/v1/public?command=returnOrderBook | 查询指定交易对的现货订单簿数据。支持 5 档或 20 档深度。 | GET | 公开 | size, symbol | asks, quantity, price, bids, quantity, price, pair |
| 1.5 | 获取最近成交 | /api/v1/public?command=returnTradeHistory | 查询指定交易对的最近成交记录,包括数量、价格、总额、时间、方向和交易 ID。 | GET | 公开 | symbol | id, type, price, amount, total, time, pair |
| 1.6 | 获取 K 线数据 | /api/v1/public?command=returnChartData | 查询指定交易对的 K 线(蜡烛图)数据,包括 OHLC 和交易量。 | GET | 公开 | currencyPair, period | date, high, low, open, close, volume, pair |
| 1.7 | 获取热门交易对 24 小时交易量 | /api/v1/public?command=return24hVolume | 返回热门交易对和市场总量(如 BTC/ETH/USDT 相关指标)的 24 小时交易量汇总。 | GET | 公开 | — | data, totalETH, totalUSDT, totalBTC, ETH_USDT, ETH, USDT, LTC_CNYT, LTC,共 28 个字段 |
| 撤销所有订单 |
/api/v1/private?command=cancelAllOrder |
| 撤销指定交易对的所有未成交订单。 |
| POST |
| 私有 |
| api_key, sign, currencyPair |
| msg |
| 3.3 | 批量获取历史订单 | /v1/private?command=getBatchHistoryOrders | 根据订单 ID 列表批量查询历史订单(最近 3 个月)(详情见 api-doc 3.3)。 | POST | 私有 | api_key, sign, orderIds | data, orderId, date, side, type, dealSize, dealFunds, dealAvgPrice, fee,共 16 个字段 |
| 3.4 | 获取订单详情 | /api/v1/private?command=returnOrderTrades | 返回指定订单 ID 的详细信息。 | POST | 私有 | api_key, sign, orderNumber | tradeID, currencyPair, type, amount, success_amount, total, success_total, fee, date,共 10 个字段 |
| 3.5 | 获取订单状态 | /api/v1/private?command=returnOrderStatus | 根据订单 ID 查询订单状态,包括交易对、方向、数量、执行状态和时间戳。 | POST | 私有 | api_key, sign, orderNumber | currencyPair, type, total, startingAmount, status, date |
| 3.6 | 获取成交历史 | /api/v1/private?command=returnUTradeHistory | 返回指定交易对的成交历史记录。 | POST | 私有 | api_key, sign, currencyPair | tradeID, type, amount, success_amount, total, success_count, fee, prize, date,共 11 个字段 |
/api/v1/private?command=spotWealthTransfer |
| 在现货账户和资金账户之间划转资产以进行资金管理。 |
| POST |
| 私有 |
| api_key, sign, accountType, targetAccountType, bizType, coinCode, amount |
| data, msg |
returnOrderTradesreturnSymbolreturnTickerreturnTradeHistoryreturnUTradeHistoryspotWealthTransfer| currencyPair, currencyBase, currencyQuote, maxBuyCount, minBuyCount, pricePrecision, countPrecision, minBuyAmount, maxBuyAmount, and 12 total fields |
| 1.2 | Get 24h ticker summary for all pairs | /api/v1/public?command=returnTicker | Returns 24h summary metrics for all available pairs, including last price, best bid/ask, and volume. | GET | Public | — | id, last, lowestAsk, highestBid, percentChange, isFrozen, high24hr, low24hr, baseVolume |
| 1.4 | Get order book | /api/v1/public?command=returnOrderBook | Queries spot order book data for a specified pair. Supports 5-level or 20-level depth. | GET | Public | size, symbol | asks, quantity, price, bids, quantity, price, pair |
| 1.5 | Get recent trades | /api/v1/public?command=returnTradeHistory | Queries recent trade records for a specified pair, including amount, price, total, time, side, and trade ID. | GET | Public | symbol | id, type, price, amount, total, time, pair |
| 1.6 | Get K-line data | /api/v1/public?command=returnChartData | Queries K-line (candlestick) data for a specified pair, including OHLC and volume. | GET | Public | currencyPair, period | date, high, low, open, close, volume, pair |
| 1.7 | Get 24h volume for hot pairs | /api/v1/public?command=return24hVolume | Returns 24h volume summary for popular pairs and market totals (such as BTC/ETH/USDT-related metrics). | GET | Public | — | data, totalETH, totalUSDT, totalBTC, ETH_USDT, ETH, USDT, LTC_CNYT, LTC, and 28 total fields |
| No. | name | Endpoint | Description | Method | Authentication | Input Parameters | Output Parameters |
|---|---|---|---|---|---|---|---|
| 2.1 | Place order | /api/v1/private?command=doTrade | Places a spot order by specifying order type, amount, price, and external order ID. | POST | Private | api_key, sign, symbol, type, amount, rate, isMarket, out_trade_no | orderNumber |
| 2.2 | Cancel order | /api/v1/private?command=cancelOrder | Cancels an unfilled spot order by order ID. | POST | Private | api_key, sign, orderNumber | clientOrderId |
| 2.3 | Cancel all orders | /api/v1/private?command=cancelAllOrder | Cancels all unfilled orders for a specified trading pair. | POST | Private | api_key, sign, currencyPair | msg |
| No. | name | Endpoint | Description | Method | Authentication | Input Parameters | Output Parameters |
|---|---|---|---|---|---|---|---|
| 3.1 | Get open orders | /api/v1/private?command=returnOpenOrders | Returns all current unfilled orders for a specified pair, including order ID, time, amount, and status. | POST | Private | api_key, sign, currencyPair, startAt, endAt | orderNumber, date, startingAmount, total, type, prize, success_count, success_amount, status |
| 3.2 | Get historical orders | /api/v1/private?command=getUserTrades | Retrieves historical orders across pairs, with optional symbol filtering. Up to 100 records per request. | POST | Private | api_key, sign, symbol | tradeId, orderId, price, size, side, orderType, time, fee, before, and 10 total fields |
| 3.3 | Batch get historical orders | /v1/private?command=getBatchHistoryOrders | Batch query historical orders (last 3 months) by order ID list (see api-doc 3.3 for details). | POST | Private | api_key, sign, orderIds | data, orderId, date, side, type, dealSize, dealFunds, dealAvgPrice, fee, and 16 total fields |
| 3.4 | Get order details | /api/v1/private?command=returnOrderTrades | Returns detailed information for a specified order ID. | POST | Private | api_key, sign, orderNumber | tradeID, currencyPair, type, amount, success_amount, total, success_total, fee, date, and 10 total fields |
| 3.5 | Get order status | /api/v1/private?command=returnOrderStatus | Queries order status by order ID, including pair, side, amount, execution status, and timestamp. | POST | Private | api_key, sign, orderNumber | currencyPair, type, total, startingAmount, status, date |
| 3.6 | Get trade history | /api/v1/private?command=returnUTradeHistory | Returns trade history records for a specified pair. | POST | Private | api_key, sign, currencyPair | tradeID, type, amount, success_amount, total, success_count, fee, prize, date, and 11 total fields |
| No. | name | Endpoint | Description | Method | Authentication | Input Parameters | Output Parameters |
|---|---|---|---|---|---|---|---|
| 4.1 | Get spot account balance | /api/v1/private?command=returnBalances | Retrieves available balances in the user's spot account across supported assets. | POST | Private | api_key, sign | data, msg |
| 4.2 | Get complete spot balances | /api/v1/private?command=returnCompleteBalances | Retrieves full spot balance details, including available balances and order-frozen balances. | POST | Private | api_key, sign | data, available, onOrders |
| 4.7 | Asset transfer | /api/v1/private?command=spotWealthTransfer | Transfers assets between the spot account and funding account for fund management. | POST | Private | api_key, sign, accountType, targetAccountType, bizType, coinCode, amount | data, msg |
https://api.coinw.com.GET/POST https://api.coinw.com/api/v1/public?command=....POST https://api.coinw.com/api/v1/private?command=..., with api_key and sign (MD5, see Reference) in query/body./v1/private?command=... alongside /api/v1/private; follow actual implementation.command values (private/public endpoints covered in this file)cancelAllOrder, cancelOrder, doTrade, getBatchHistoryOrders, getUserTrades, return24hVolume, returnBalances, returnChartData, returnCompleteBalances, returnOpenOrders, returnOrderBook, returnOrderStatus, returnOrderTrades, returnSymbol, returnTicker, returnTradeHistory, returnUTradeHistory, spotWealthTransfer
BTC_USDT (field names vary by endpoint).code, msg / message, success, failed, data (actual response varies by endpoint).LIMIT, MARKET, HL_LIMIT, PLANNING, STOP_LIMIT_ORDER, SMART_MARKET_ORDER, ICEBERG, etc.curl "https://api.coinw.com/api/v1/public?command=returnSymbol"
params="api_key=$COINW_API_KEY&amount=0.001&funds=1&isMarket=1&out_trade_no=1&rate=40000&symbol=BTC_USDT"
sign_string="$params&secret_key=$COINW_SECRET_KEY"
sign=$(echo -n "$sign_string" | openssl md5 | cut -d' ' -f2 | tr '[:lower:]' '[:upper:]')
curl -X POST "https://api.coinw.com/api/v1/private?command=doTrade&$params&sign=$sign"
api_key or secret_key; if shown, mask the middle and keep only the last four characters.api_key and secret_key in a secure location.When user provides new credentials:
TOOLS.md with masked display confirmation./references/Authentication.md./references/errorcode.md./references/notes.md./references/api-key-creation-steps.mdWeekly Installs
–
Repository
First Seen
–
Security Audits
飞书视频会议CLI工具:lark-vc技能详解,高效搜索与管理会议记录与纪要
19,000 周安装