API Guide
OPEN API FOR PUBLIC
ApiCallOperation
POST /appApi.html?action=depthMarket Depth

BTC /appApi.html?action=depth&symbol=1

Example
# Request 
POST BTC /appApi.html?action=depth&symbol=1
# Response
{
  "code": 200,
  "msg": "Get depth data",
  "time": 1486203073756,
  "data": {
    "date": 1478758913,
    "asks": [
      [
        5003.68,
        0.275
      ]
    ],
    "bids": [
      [
        4903.66,
        0.075
      ]
    ]
  }
}
Result
date : Server Time
asks : Sell Depth
bids : Buy Depth
Request parameter
NameDescription
symbolCurrency: 21 (Bitcoin / Ethereum market)
sizeDepth: Maximum support 10 (default 10)
POST /appApi.html?action=klineGet Graph Data

BTC /appApi.html?action=kline&symbol=1&step=60

Example
# Request 
POST /appApi.html?action=kline&symbol=1&step=60
# Response
{
  "code": 200,
  "msg": "Graph Data",
  "time": 1486203073756,
  "data": "[[1478746261695,4939.32,4939.97,4938.74,4939.58,446.9005]]"
}
Result
[
	1478746261695, Timestamp
4939.32, Open
4939.97, High
4938.74, Low
4939.58, Received
446.9005 Trading Volume
]
Request parameter
NameType
symbolMarket Pair: 21
step60(1m), 60*3(3m),60*5(5m),60*15(15m),60*30(3m),60*60(1h),60*60*2(2h),60*60*4(4h),60*60*6(6h),
60*60*12(12h),60*60*24(1d),60*60*24*3(3d),60*60*24*7(1w)
POST /appApi.html?action=marketSingle Market Data

BTC /appApi.html?action=market&symbol=10

Example
# Request 
POST /appApi.html?action=market&symbol=1
# Response
{
  "code": 200,
  "msg": "Market Data",
  "time": 1486203073756,
  "data": {
    "high": 4962.03,
    "vol": 1633159.5247,
    "last": 4899.26,
    "low": 4876,
    "buy": 4898.93,
    "sell": 4899.26
  }
}
Result
High: Highest price
Vol: Volume (24 hours)
Last: Latest transaction price
Low: Lowest price
Buy: Buy price
Sell: Sell price
Required Parameter
NameType
symbolCurrency: 21 (Bitcoin / Ethereum market)
POST /appApi.html?action=allMarketsAll Market Data

BTC /appApi.html?action=allMarkets

Example
# Request 
POST /appApi.html?action=allMarkets
# Response
{
    "code": 200, 
    "msg": "All Market Data", 
    "time": 1537344879416, 
    "data": [
        {
            "symbol": "1", 
            "mapping": "BTC_USDT", 
            "rmb_new": "6.8665", 
            "last": 1, 
            "high": 0, 
            "low": 0, 
            "vol": 0, 
            "buy": 1, 
            "sell": 1
        }
    ]
}
Result
High: Highest price
Vol: Volume (24 hours)
Last: Latest transaction price
Low: Lowest price
Buy: Buy price
Sell: Sell price
Required Parameter
NameType
symbolCurrency: 21 (Bitcoin / Ethereum market)
POST /appApi.html?action=tradesGet OrderBook

BTC /appApi.html?action=trades?&symbol=10

Example
# Request 
POST /appApi.html?action=trades&symbol=1
# Response
{
  "code": 200,
  "msg": "Latest Orderbook",
  "time": 1486203073756,
  "data": [
    {
      "amount": 1.7931,
      "price": 4906.49,
      "id": 1,
      "time": "15:59:24",
      "en_type": "ask",
      "type": "Sell"
    }
}
Result
Amount: number of transactions
Price: transaction price
Id: data ID
Time: trading time
En_type: transaction type ask/bid
Type: transaction type sell/buy
Required Parameter
NameType
symbolCurrency: 21 (Bitcoin / Ethereum market)
POST /appApi.html?action=mappingsGet All Market Pair

/appApi.html?action=mappings

Example
# Request 
POST /appApi.html?action=mappings
# Response
{
    "code": 200, 
    "msg": "All Market Pair", 
    "time": 1533202458000, 
    "data": [
        {
            "symbol": 2, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "LTC_BTC"
        }, 
        {
            "symbol": 3, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "LTC_USDT"
        }, 
        {
            "symbol": 4, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "ETH_USDT"
        }, 
        {
            "symbol": 5, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "ETH_BTC"
        }, 
        {
            "symbol": 6, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "BCH_USDT"
        }, 
        {
            "symbol": 7, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "BTC_USDT"
        }, 
        {
            "symbol": 8, 
            "count1": 8, 
            "count2": 6, 
            "mapping": "BCH_BTC"
        }
    ]
}
Result
Symbol: transaction pair ID
Count1: unit price decimal place
Count2: number of decimal places
Mapping: transaction pair name
Required Parameter
NameType
symbolCurrency: 21 (Bitcoin / Ethereum market)
PRIVATE API
API for trading,Trade History, Balance, OrderBook
InterfaceDescription
/user/api.htmlGET API KEY
Description

> 1. Get apiKey and secretKey for API authentication
The apiKey and secretKey can be obtained by applying for the API, where apiKey is the access key provided to the API user, and secretKey is used to sign the private key of the request parameter.
 Note: Do not reveal these two parameters to anyone. These two parameters are related to account security.
> 2. Generate a string to be signed
The parameters submitted by the user must participate in the signature except for the sign.
The string to be signed needs to be sorted according to the parameter name (first compare the first letter of all parameter names, arranged in abcd order, if you encounter the same initial letter, look at the second letter, and so on.)
For example: Sign the following parameters string[] parameters={"api_key=c821db84-6fbd-11e4-a9e3-c86000d26d7c","symbol=1","type=0","price=680","amount=1.0 "};
 Generate the string to be signed as: amount=1.0&api_key=c821db84-6fbd-11e4-a9e3-c86000d26d7c&price=680&symbol=1&type=buy
> 3. MD5 signature
When signing MD5, the private key secretKey is required to participate in the signature.
Add the private key parameter to the string to be signed to generate the final string to be signed.
For example: amount=1.0&api_key=c821db84-6fbd-11e4-a9e3-c86000d26d7c&price=680&symbol=1&type=buy&secret_key=secretKey Note that “&secret_key=secretKey” is a mandatory parameter for signature.
The 32-bit MD5 algorithm is used to perform the signature operation on the final string to be signed, thereby obtaining the signature result string (the string is assigned to the parameter sign), and the letters in the MD5 calculation result are all uppercase.

Example for Buy or Sell [type= 0(Buy), 1 (Sell)] order:

BUY: https://www.tradekainos.com/appApi.html?action=trade&amount=500&api_key=your_api_key&price=0.00000123&symbol=1&type=0&sign=your_generated_sign
SELL: https://www.tradekainos.com/appApi.html?action=trade&amount=500&api_key=your_api_key&price=0.00000123&symbol=1&type=1&sign=your_generated_sign
POST /appApi.html?action=tradeMake Trade

BTC /appApi.html?action=trade&symbol=1&type=buy&amount=1&price=5000

Example
# Request 
POST /appApi.html?action=trade&symbol=1&type=buy&amount=1&price=5000
# Response
{
  "code": 200,
  "msg": "Successful",
  "time": 1486203073756,
  "data": null
}
Result
Code : return code
Msg : return message
Time : timestamp (ms)
Data : carrying data
Request Parameter
NameType
symbolCurrency: 21 (Bitcoin / Ethereum market)
typeTrade type: 0-Buy, 1-sell
amountQuantity
pricePrice
POST /appApi.html?action=cancel_entrustCancel Trade

BTC /appApi.html?action=cancel_entrust?id=1

Example
# Request 
POST /appApi.html?action=cancel_entrust?id=1
# Response
{
  "code": 200,
  "msg": "Cancelled",
  "time": 1486203073756,
  "data": null
}
Result
Code : return code
Msg : return message
Time : timestamp (ms)
Data : carrying data
Required Data
NameType
idOrder ID
POST /appApi.html?action=entrustPENDING ORDER HISTORY(CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=entrust&symbol=1

Example
# Request 
POST /appApi.html?action=entrust&symbol=1
# Response
{
  "code": 200,
  "msg": "查询当前委单",
  "time": 1486203073756,
  "data": null
}
返回值说明
code : 返回码
msg  : 返回消息
time : 时间戳(ms)
data : 携带数据
请求参数名
参数名描述
symbolCurrency: 21 (Bitcoin / Ethereum market)
POST /appApi.html?action=lastentrustLATEST 10 PENDING ORDER (CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=lastentrust&symbol=1

Example
# Request 
POST /appApi.html?action=lastentrust&symbol=1
# Response
{
  "code": 200,
  "msg": "查询最新10笔成交委单",
  "time": 1486203073756,
  "data": null
}
返回值说明
code : 返回码
msg  : 返回消息
time : 时间戳(ms)
data : 携带数据
请求参数名
参数名描述
symbolCurrency: 21 (Bitcoin / Ethereum market)
POST /appApi.html?action=orderTRADE HISTORY(CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=order&id=1

Example
# Request 
POST /appApi.html?action=order&id=1
# Response
{
  "code": 200,
  "msg": "根本id查委托订单详细信息",
  "time": 1486203073756,
  "data": null
}
Result
code : Return code
msg  : Return the message
time : Time stamp(ms)
data : Carry the data
Required Parameter
NameType
idOrder id: 1
POST /appApi.html?action=userinfoGET BALANCE (CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=userinfo

Example
# Request 
POST /appApi.html?action=userinfo
# Response
{
  "code": 200,
  "msg": "成功",
  "time": 1486203073756,
  "data": {
    "frozen": {
      "BTC": 0,
      "ETC": 0,
      "LTC": 0,
      "CNY": 0
    },
    "free": {
      "BTC": 0,
      "ETC": 0,
      "LTC": 0,
      "CNY": 0
    }
  }
}
Result
code: return code
msg: return message
data: carry data
free: Available assets
Frozen: Frozen assets
asset: total assets
Required Parameter
NameType
WITHDRAWAL API
Used for quick cash withdrawal
API CALLSEXAMPLE
POST /appApi.html?action=cancel_withdrawCANCEL WITHDRAWAL(CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=cancel_withdraw&id=1

EXAMPLE
# Request 
POST /appApi.html?action=cancel_withdraw?id=1
# Response
{
  "code": 200,
  "msg": "Cancel withdrawal successful",
  "time": 1486203073756,
  "data": null
}
Return value description
code : Return code
msg  : Return the message
time : Time stamp(ms)
data : Carry the data
Request parameter name
parameter namedescription
withdraw_idWithdraw id
POST /appApi.html?action=withdrawMAKE WITHDRAW(CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=withdraw&symbol=1&amount=1&withdrawaddress=123456

Example
# Request 
POST /appApi.html?action=withdraw?symbol=1&amount=1&withdrawaddress=123456
# Response
{
  "code": 200,
  "msg": "Withdraw now, please wait for the administrator to review",
  "time": 1486203073756,
  "data": null
}
Return value description
code : Return code
msg  : Return the message
time : Time stamp(ms)
data : Carry the data
Request parameter name
parameter namedescription
symbolCurrency: 1 (bitcoin)
amountDraw the number
withdrawaddressCertified cash withdrawal address
POST /appApi.html?action=withdraw_recordWITHDRAWAL HISTORY(CLICK TO SEE EXAMPLE)

BTC /appApi.html?action=withdraw_record?symbol=1

EXAMPLE
# Request 
POST /appApi.html?action=withdraw_record?symbol=1
# Response
{
  "code": 200,
  "msg": "Query virtual cash withdrawal records",
  "time": 1486203073756,
  "data": []
}
Return value description
code : Return code
msg  : Return the message
time : Time stamp(ms)
data : Carry the data
Request parameter name
parameter namedescription
symbolCurrency: 1 (bitcoin)
COMMON API RESULT & ERROR
API interface call error code description
RESULT/ERROR CODEDESCRIPTION
200Successful operation
500Operation failed
10001Server Busy
10002API does not exist
10003Parameter error
10004No trading rights
10005No withdrawal permission
10006api_key Error
10007Wrong MD5 Signature

Tradekainos

Tradekainos Autonomous Digital Asset eXchange

Support

Customer service
API document
Coin Introduction

ABOUT US

Fees
Announcement
About Us

Legal

Terms of Use
Privacy Policy
Legal Statement

CONTACT US