Welcome to CoinW developer documentations. Coinw API current support three group of actions: market ticker, trading and withdrawal
Trading and withdrawal actions related API would require signature verification
BTC /appApi.html?action=currencys
# Request
POST /appApi.html?action=currencys
# Response
{
"code": 200,
"msg": Obtain token and trading pair symbol,
"time": 1486203073756,
"data": {
"BTC": {
"shortName": "BTC",
"lastUpdateTime": 1564987681191,
"name": "BTC",
"id": 1,
"withDraw": "1",
"recharge": "0",
"maxQty": 100,
"minQty": 0.02,
"txFee": 0
}
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data {"BTC": {
"shortName": name,
"lastUpdateTime": Last update time,
"name": full name,
"id": ID,
"withDraw": permission to withdraw
"recharge": permission to deposit
"maxQty": maximum withdrawal amount,
"minQty": minimum withdrawal amount,
"txFee": Fees
}
}
BTC /appApi.html?action=symbols
# Request
POST /appApi.html?action=symbols
# Response
{
"code": 200,
"msg": Obtain token and trading pair symbol,
"time": 1486203073756,
"data": [{
"symbol": 29,
"base-currency": "CNYT",
"quote-currency": "USDT",
"lastUpdateTime": 1564987947865,
"latestDealPrice": "100.0",
"lowestPrice": "0.0",
"highestPrice": "0.0",
"24Total": "0.0",
"fStatus": "1"
}]
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data [{
"symbol": symbol,
"base-currency": base coin,
"quote-currency": quote coin,
"lastUpdateTime": Last update time,
"latestDealPrice": latest price,
"lowestPrice": lowest buy price,
"highestPrice": highest sell price,
"24Total": base coin trading volume / 24 hours,
"fStatus": permission to trade
}]
BTC /appApi.html?action=getSymbol
# Request
POST /appApi.html?action=getSymbol
# Response
{
"code": 200,
"msg": Obtain token and trading pair symbol,
"time": 1486203073756,
"data": {
"币种symbol": "3-BC 4-LTC 6-HC 7-STX"
"交易对symbol": "2:BC/CNYT 3:LTC/CNYT 5:HC/CNYT 6:STX/CNYT 7:0X/CNYT 8:CDT/CNYT ..."
}
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data "交易对symbol":Pair,format: "symbol:market BC/CNYT market symbol is "2"
BTC /appApi.html?action=depth&symbol=1
# Request
POST BTC /appApi.html?action=depth&symbol=1
# Response
{
"code": 200,
"msg": "Get market depth",
"time": 1486203073756,
"data": {
"bids": [
{
"id": 1,
"price": "0.0051",
"amount": "12000.000"
},
{
"id": 2,
"price": "0.0035",
"amount": "156581.460"
},
{
"id": 3,
"price": "0.003",
"amount": "5000.000"
} ...
],
"asks": [
{
"id": 1,
"price": "0.0058",
"amount": "6752.000"
},
{
"id": 2,
"price": "0.0059",
"amount": "252484.713"
},
{
"id": 3,
"price": "0.0061",
"amount": "290360.742"
} ...
]
}
}
time : The timestamp of returning data
asks : Seller Depth
bids : Buyer Depth
BTC /appApi.html?action=kline&symbol=1&step=60
# Request
POST /appApi.html?action=kline&symbol=1&step=60
# Response
{
"code": 200,
"msg": Return value specification,
"time": 1486203073756,
"data": "[[1478746261695,4939.32,4939.97,4938.74,4939.58,446.9005]]"
}
[
1478746261695, timestamp
4939.32, Open
4939.97, High
4938.74, Low
4939.58, Close
446.9005 Volume 24h
]
BTC /appApi.html?action=market&symbol=1
# Request
POST /appApi.html?action=market&symbol=1
# Response
{
"code": 200,
"msg": Get enabled market information,
"time": 1486203073756,
"buy": 0.276,
"sell": 0.2948,
"data": {
"last": 0.2763,
"high": 0.2948,
"low": 0.275,
"vol": 1.9877
}
}
buy: BUY 1 Price
sell: SELL 1 Price
high: High 24h
low: Lowest Price
vol: Volume 24h
last: Latest Price
BTC /appApi.html?action=trades?&symbol=1
# Request
POST /appApi.html?action=trades&symbol=1
# Response
{
"code": 200,
"msg": Get the latest trade records,
"time": 1486203073756,
"data": [
{
"amount": 1.7931,
"price": 4906.49,
"id": 1,
"time": "15:59:24",
"en_type": "ask",
"type": "卖出"
}
}
amount: Trading volume
price: Trading price
id: Data ID
time: Transaction time
en_type: Operation type ask/bid
type: Operation type ask/bid
BTC /appApi.html?action=trade&symbol=1&type=0&amount=1&price=5000
# Request
POST /appApi.html?action=trade&symbol=1&type=buy&amount=1&price=5000
# Response
{
"code": 200,
"msg": "Place order successfully",
"time": 1486203073756,
"data": 123
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carrying data (order number)
BTC /appApi.html?action=trade_batch&combination=1,0,1,5000:1,0,1,5000:1,0,1,5000
# Request
POST /appApi.html?action=trade_batch&combination=1,0,1,5000:1,0,1,5000:1,0,1,5000
# Response
{
"code": 200,
"msg": "Place order successfully",
"time": 1486203073756,
"data": [123,321,111]
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : The returned data is the id of the successful order. If multiple successes, it is returned by array.
Only part of the bulk orders may be successfully purchased due to money issues. Please carefully review the data after ordering to avoid repeated orders. The bulk supports up to 100
BTC /appApi.html?action=cancel_entrust?id=1
# Request
POST /appApi.html?action=cancel_entrust?id=1
# Response
{
"code": 200,
"msg": Cancel successfully,
"time": 1486203073756,
"data": null
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
BTC /appApi.html?action=cancel_entrust_batch&ids=1,3,5
# Request
POST /appApi.html?action=cancel_entrust_batch&ids=1,3,5
# Response
{
"code": 200,
"msg": "Place order successfully",
"time": 1486203073756,
"data": [123,321,111]
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : The returned data is the id of the unsuccessfully canceled order. If multiple exists, it is returned by [123,321,111]. All succeed, return empty, code is 200
BTC /appApi.html?action=cancel_entrust_all
# Request
POST /appApi.html?action=cancel_entrust_all
# Response
{
"code": 200,
"msg": "Place order successfully",
"time": 1486203073756
}
code : Return code
msg : Return Message
time : timestamp(ms)
BTC /appApi.html?action=entrust&symbol=1
# Request
POST /appApi.html?action=entrust&symbol=1
# Response
{
"code": 200,
"msg": View open orders,
"time": 1486203073756,
"data": [
{
"prize": 0.18,
"count": 70,
"success_count": 0,
"amount": 12.6,
"success_amount": 0,
"type": 0,
"type_s": "买入",
"status": 1,
"status_s": "未成交",
"createTime": 1564987474000,
"id": 270532666
}
]
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
prize: price
count: amount
success_count: Total Completed Amount
amount: total
success_amount: Total Completed Volume
type: Order amount
type_s: type description
status: Status: 1-incompleted、2.-Partial completed、3.-Completed、4.-Canceled
status_s: status description
createTime: create time
id: Order ID
BTC /appApi.html?action=lastentrust&symbol=1
# Request
POST /appApi.html?action=lastentrust&symbol=1
# Response
{
"code": 200,
"msg": "Get multiple orders info, return 100 records in one time",
"time": 1486203073756,
"data": [
{
"prize": 10,
"count": 1,
"success_count": 1,
"amount": 10,
"success_amount": 0.2872,
"type": 0,
"type_s": "买入",
"status": 3,
"status_s": "完全成交",
"update_time": 1486203073756
}
]
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
prize: price
count: amount
success_count: Total Completed Amount
amount: total
success_amount: Total Completed Volume
type: Order amount
type_s: type description
status: Status: 1-incompleted、2.-Partial completed、3.-Completed、4.-Canceled
status_s: status description
update_time: timestamp(ms)
BTC /appApi.html?action=order&id=1
# Request
POST /appApi.html?action=order&id=1
# Response
{
"code": 200,
"msg": Get order details by order id,
"time": 1486203073756,
"data": [
{
"prize": 0.18,
"count": 70,
"success_count": "0.000",
"amount": 12.6,
"success_amount": 0,
"type": 0,
"type_s": "买入",
"status": 1,
"status_s": "未成交",
"id": 270532666
}
]
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
prize: price
count: amount
success_count: Total Completed Amount
amount: total
success_amount: Total Completed Volume
type: Order amount
type_s: type description
status: Status: 1-incompleted、2.-Partial completed、3.-Completed、4.-Canceled
status_s: status description
id: Order ID
BTC /appApi.html?action=userinfo
# Request
POST /appApi.html?action=userinfo
# Response
{
"code": 200,
"msg": successful,
"time": 1486203073756,
"data": {
"frozen": {
"BTC": 0,
"ETC": 0,
"LTC": 0,
"CNY": 0 ...
},
"free": {
"BTC": 0,
"ETC": 0,
"LTC": 0,
"CNY": 0 ...
}
}
}
code : Return code
msg : Return Message
data : Carry data
free : Available
frozen : Frozen
BTC /appApi.html?action=cancel_withdraw&id=1
# Request
POST /appApi.html?action=cancel_withdraw?id=1
# Response
{
"code": 200,
"msg": Cancel withdraw successfully,
"time": 1486203073756,
"data": null
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
BTC /appApi.html?action=withdraw&symbol=1&amount=1&withdrawaddress=123456
# Request
POST /appApi.html?action=withdraw?symbol=1&amount=1&withdrawaddress=123456
# Response
{
"code": 200,
"msg": Withdraw successfully, please wait for proccessing.,
"time": 1486203073756,
"data": null
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
BTC /appApi.html?action=withdraw_record?symbol=1
# Request
POST /appApi.html?action=withdraw_record?symbol=1
# Response
{
"code": 200,
"msg": Get digital asset withdrawal history,
"time": 1486203073756,
"data": [
{
"amount": 12.6,
"fees": 0,
"withdraw_virtual_address": xxx,
"createTime": 1486203073756,
"status": 3
"status_s": "提现成功"
}
]
}
code : Return code
msg : Return Message
time : timestamp(ms)
data : Carry data
amount: Amount
fees: Transaction Fee
withdraw_virtual_address: Withdrawal Address
createTime: create time
status: Status: 1-incompleted、2.-Partial completed、3.-Completed、4.-Canceled
status_s: status description