Coinw Spot REST API skill: covers market data, order placement/cancellation, order queries, account balances, and asset transfers.
CoinW private endpoints require api_key and a request signature ( sign).
Signing note: Spot endpoints use Spot MD5 uppercase signing. Do not use Contract HMAC-SHA256 signing for Spot APIs.
bash
export COINW_API_KEY="your_api_key"
export COINW_SECRET_KEY="your_secret_key"
api_key/ secret_key (and an account name). The agent will mask secrets when showing them back and store them securely in OpenClaw's credential storage (not inside skill markdown files).No.nameEndpointDescriptionMethodAuthenticationInput ParametersOutput ParametersDetailed Doc URL1.1Get trading pair information/api/v1/public?command=returnSymbolReturns detailed information for all spot pairs, including min/max order price, quantity limits, and precision.GETPublic—currencyPair, currencyBase, currencyQuote, maxBuyCount, minBuyCount, pricePrecision, countPrecision, minBuyAmount, maxBuyAmount, and 12 total fieldshttps://www.coinw.com/api-doc/spot-trading/market/get-trading-pair-information1.2Get 24h ticker summary for all pairs/api/v1/public?command=returnTickerReturns 24h summary metrics for all available pairs, including last price, best bid/ask, and volume.GETPublic—id, last, lowestAsk, highestBid, percentChange, isFrozen, high24hr, low24hr, baseVolumehttps://www.coinw.com/api-doc/spot-trading/market/get-24h-trade-summary-for-all-instruments1.4Get order book/api/v1/public?command=returnOrderBookQueries spot order book data for a specified pair. Supports 5-level or 20-level depth.GETPublicsize, symbolasks, quantity, price, bids, quantity, price, pairhttps://www.coinw.com/api-doc/spot-trading/market/get-order-book1.5Get recent trades/api/v1/public?command=returnTradeHistoryQueries recent trade records for a specified pair, including amount, price, total, time, side, and trade ID.GETPublicsymbolid, type, price, amount, total, time, pairhttps://www.coinw.com/api-doc/spot-trading/market/get-recent-trades1.6Get K-line data/api/v1/public?command=returnChartDataQueries K-line (candlestick) data for a specified pair, including OHLC and volume.GETPubliccurrencyPair, perioddate, high, low, open, close, volume, pairhttps://www.coinw.com/api-doc/spot-trading/market/get-k-line1.7Get 24h volume for hot pairs/api/v1/public?command=return24hVolumeReturns 24h volume summary for popular pairs and market totals (such as BTC/ETH/USDT-related metrics).GETPublic—data, totalETH, totalUSDT, totalBTC, ETH_USDT, ETH, USDT, LTC_CNYT, LTC, and 28 total fieldshttps://www.coinw.com/api-doc/spot-trading/market/get-24h-volume-for-popular-instruments
No.nameEndpointDescriptionMethodAuthenticationInput ParametersOutput ParametersDetailed Doc URL2.1Place order/api/v1/private?command=doTradePlaces a spot order by specifying order type, amount, price, and external order ID.POSTPrivateapi_key, sign, symbol, type, amount, rate, isMarket, out_trade_noorderNumberhttps://www.coinw.com/api-doc/spot-trading/trade/place-order2.2Cancel order/api/v1/private?command=cancelOrderCancels an unfilled spot order by order ID.POSTPrivateapi_key, sign, orderNumberclientOrderIdhttps://www.coinw.com/api-doc/spot-trading/trade/cancel-order2.3Cancel all orders/api/v1/private?command=cancelAllOrderCancels all unfilled orders for a specified trading pair.POSTPrivateapi_key, sign, currencyPairmsghttps://www.coinw.com/api-doc/spot-trading/trade/cancel-all-orders
No.nameEndpointDescriptionMethodAuthenticationInput ParametersOutput ParametersDetailed Doc URL3.1Get open orders/api/v1/private?command=returnOpenOrdersReturns all current unfilled orders for a specified pair, including order ID, time, amount, and status.POSTPrivateapi_key, sign, currencyPair, startAt, endAtorderNumber, date, startingAmount, total, type, prize, success_count, success_amount, statushttps://www.coinw.com/api-doc/spot-trading/check/get-current-orders3.2Get historical orders/api/v1/private?command=getUserTradesRetrieves historical orders across pairs, with optional symbol filtering. Up to 100 records per request.POSTPrivateapi_key, sign, symboltradeId, orderId, price, size, side, orderType, time, fee, before, and 10 total fieldshttps://www.coinw.com/api-doc/spot-trading/check/get-historical-orders3.3Batch get historical orders/v1/private?command=getBatchHistoryOrdersBatch query historical orders (last 3 months) by order ID list (see api-doc 3.3 for details).POSTPrivateapi_key, sign, orderIdsdata, orderId, date, side, type, dealSize, dealFunds, dealAvgPrice, fee, and 16 total fieldshttps://www.coinw.com/api-doc/spot-trading/check/get-batch-historical-orders3.4Get order details/api/v1/private?command=returnOrderTradesReturns detailed information for a specified order ID.POSTPrivateapi_key, sign, orderNumbertradeID, currencyPair, type, amount, success_amount, total, success_total, fee, date, and 10 total fieldshttps://www.coinw.com/api-doc/spot-trading/check/get-order-details3.5Get order status/api/v1/private?command=returnOrderStatusQueries order status by order ID, including pair, side, amount, execution status, and timestamp.POSTPrivateapi_key, sign, orderNumbercurrencyPair, type, total, startingAmount, status, datehttps://www.coinw.com/api-doc/spot-trading/check/get-order-status3.6Get trade history/api/v1/private?command=returnUTradeHistoryReturns trade history records for a specified pair.POSTPrivateapi_key, sign, currencyPairtradeID, type, amount, success_amount, total, success_count, fee, prize, date, and 11 total fieldshttps://www.coinw.com/api-doc/spot-trading/check/get-transaction-history
No.nameEndpointDescriptionMethodAuthenticationInput ParametersOutput ParametersDetailed Doc URL4.1Get spot account balance/api/v1/private?command=returnBalancesRetrieves available balances in the user's spot account across supported assets.POSTPrivateapi_key, signdata, msghttps://www.coinw.com/api-doc/spot-trading/account/get-spot-account-balance4.2Get complete spot balances/api/v1/private?command=returnCompleteBalancesRetrieves full spot balance details, including available balances and order-frozen balances.POSTPrivateapi_key, signdata, available, onOrdershttps://www.coinw.com/api-doc/spot-trading/account/get-total-spot-account-balance4.7Asset transfer/api/v1/private?command=spotWealthTransferTransfers assets between the spot account and funding account for fund management.POSTPrivateapi_key, sign, accountType, targetAccountType, bizType, coinCode, amountdata, msghttps://www.coinw.com/api-doc/spot-trading/account/transfer-assets
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.bash
curl "https://api.coinw.com/api/v1/public?command=returnSymbol"
bash
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"
When showing credentials to users:
12&*1...198I***...isf1api_key and secret_key in a secure location.When user provides new credentials:
./references/Authentication.md./references/error-codes.md./references/notes.md./references/api-key-creation-steps.md